QGIS/resources/function_help/regexp_replace

16 lines
859 B
Plaintext

<h3>regexp_replace() function</h3>
Returns a string with the supplied regular expression replaced.
<p><h4>Syntax</h4>
regexp_replace(<i>string,regex,after</i>)</p>
<p><h4>Arguments</h4>
<!-- List args for functions here-->
<i> string</i> &rarr; is string. The start string.<br>
<i> regex</i> &rarr; is string. The regular expression to replace. Backslash characters must be double escaped (eg "\\s" to match a white space character). Non-greedy regular expressions are not supported.<br>
<i> after</i> &rarr; is string. The string that will replace any matching occurences of the supplied regular expression. Captured groups can be inserted into the replacement string using \\1, \\2, etc. <br></p>
<p><h4>Example</h4>
<!-- Show example of function.-->
regexp_replace('QGIS SHOULD ROCK','\\sSHOULD\\s',' DOES ') &rarr; 'QGIS DOES ROCK'</p>