Regular expressions: Difference between revisions
→{{header|langur}}
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) |
||
Line 1,390:
The following examples use re2 regex literals.
There are several functions that can be used with regexes, such as match(), replace(), split(), etc. They can also be matched
To match a string, ...
<syntaxhighlight lang="langur">if
Or...
Line 1,400:
Or...
<syntaxhighlight lang="langur">switch "somestring" {
case -> re/abc/: ...
...
}</syntaxhighlight>
Or...
<syntaxhighlight lang="langur">switch -> re/abc/ {
case "somestring": ...
...
|