Skip to content
Permalink
Browse files

Fix escaping in regexp function help

(cherry-picked from e69dd9c)
  • Loading branch information
nyalldawson committed Oct 13, 2016
1 parent e160750 commit 4dcbc1f6aa6b1d958ef8c2ba99fa0a0d28a9c2de
@@ -3,7 +3,7 @@
"type": "function",
"description": "Returns true if any part of a string matches the supplied regular expression.",
"arguments": [ {"arg":"input_string","description":"the string to test against the regular expression"},
{"arg":"regex","description":"The regular expression to test against. Backslash characters must be double escaped (eg \"\\\\s\" to match a white space character). Non-greedy regular expressions are not supported."}
{"arg":"regex","description":"The regular expression to test against. Backslash characters must be double escaped (eg \"\\\\\\\\s\" to match a white space character). Non-greedy regular expressions are not supported."}
],
"examples": [ { "expression":"regexp_match('QGIS ROCKS','\\\\sROCKS')", "returns":"true"}]
"examples": [ { "expression":"regexp_match('QGIS ROCKS','\\\\\\\\sROCKS')", "returns":"true"}]
}
@@ -3,8 +3,8 @@
"type": "function",
"description": "Returns a string with the supplied regular expression replaced.",
"arguments": [ {"arg":"input_string","description":"the string to replace matches in"},
{"arg":"regex","description":"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."},
{"arg":"replacement","description":"The string that will replace any matching occurrences of the supplied regular expression. Captured groups can be inserted into the replacement string using \\\\1, \\\\2, etc."}
{"arg":"regex","description":"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."},
{"arg":"replacement","description":"The string that will replace any matching occurrences of the supplied regular expression. Captured groups can be inserted into the replacement string using \\\\\\\\1, \\\\\\\\2, etc."}
],
"examples": [ { "expression":"regexp_replace('QGIS SHOULD ROCK','\\\\sSHOULD\\\\s',' DOES ')", "returns":"'QGIS DOES ROCK'"}]
"examples": [ { "expression":"regexp_replace('QGIS SHOULD ROCK','\\\\\\\\sSHOULD\\\\\\\\s',' DOES ')", "returns":"'QGIS DOES ROCK'"}]
}
@@ -3,7 +3,7 @@
"type": "function",
"description": "Returns the portion of a string which matches a supplied regular expression.",
"arguments": [ {"arg":"input_string","description":"the string to find matches in"},
{"arg":"regex","description":"The regular expression to match against. Backslash characters must be double escaped (eg \"\\\\s\" to match a white space character). Non-greedy regular expressions are not supported."}
{"arg":"regex","description":"The regular expression to match against. Backslash characters must be double escaped (eg \"\\\\\\\\s\" to match a white space character). Non-greedy regular expressions are not supported."}
],
"examples": [ { "expression":"regexp_substr('abc123','(\\\\d+)')", "returns":"'123'"}]
"examples": [ { "expression":"regexp_substr('abc123','(\\\\\\\\d+)')", "returns":"'123'"}]
}

0 comments on commit 4dcbc1f

Please sign in to comment.
You can’t perform that action at this time.