Skip to content

Commit b40b491

Browse files
committedOct 12, 2016
Fix escaping in regexp function help
(cherry-picked from e69dd9c)
1 parent b9a69d0 commit b40b491

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed
 

‎resources/function_help/json/regexp_match

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "function",
44
"description": "Returns true if any part of a string matches the supplied regular expression.",
55
"arguments": [ {"arg":"input_string","description":"the string to test against the regular expression"},
6-
{"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."}
6+
{"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."}
77
],
8-
"examples": [ { "expression":"regexp_match('QGIS ROCKS','\\\\sROCKS')", "returns":"true"}]
8+
"examples": [ { "expression":"regexp_match('QGIS ROCKS','\\\\\\\\sROCKS')", "returns":"true"}]
99
}

‎resources/function_help/json/regexp_replace

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"type": "function",
44
"description": "Returns a string with the supplied regular expression replaced.",
55
"arguments": [ {"arg":"input_string","description":"the string to replace matches in"},
6-
{"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."},
7-
{"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."}
6+
{"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."},
7+
{"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."}
88
],
9-
"examples": [ { "expression":"regexp_replace('QGIS SHOULD ROCK','\\\\sSHOULD\\\\s',' DOES ')", "returns":"'QGIS DOES ROCK'"}]
9+
"examples": [ { "expression":"regexp_replace('QGIS SHOULD ROCK','\\\\\\\\sSHOULD\\\\\\\\s',' DOES ')", "returns":"'QGIS DOES ROCK'"}]
1010
}

‎resources/function_help/json/regexp_substr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "function",
44
"description": "Returns the portion of a string which matches a supplied regular expression.",
55
"arguments": [ {"arg":"input_string","description":"the string to find matches in"},
6-
{"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."}
6+
{"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."}
77
],
8-
"examples": [ { "expression":"regexp_substr('abc123','(\\\\d+)')", "returns":"'123'"}]
8+
"examples": [ { "expression":"regexp_substr('abc123','(\\\\\\\\d+)')", "returns":"'123'"}]
99
}

0 commit comments

Comments
 (0)
Please sign in to comment.