I want to replace content of long Strings in postgres column.
The match pattern is "{Begin}{anything}{mid}{anything}{end}"
, and the match is non-greedy version.
Begin, mid, end is fixed content while anything can include character, number, space, newline etc.
With common regex we can use ([\s\S]*?)
but it doesn't work well in Postgres.
How can I do with this.
Example: I have a DB column name "descriptor", I want to match content
"<function type="class"> {anything} <arg name="class.name">com.ehi.jira.plugin.workflow {anything} </function>",
and it should match the shortest content.With common regex I will use
"<function type="class">([\s\S]*?)<arg name="class.name">com.ehi.jira.plugin.workflow([\s\S]*?)</function>".
But it doesn't work in postgresql.