Regular expressions: Difference between revisions
m
→{{header|Wren}}: Minor tidy
m (→{{header|Wren}}: Minor tidy) |
|||
Line 2,993:
{{libheader|Wren-pattern}}
The above module allows us to do simple string pattern matching and replacement in a similar fashion to regular expressions but using a different syntax. SenseTalk's examples have been borrowed for this purpose.
<syntaxhighlight lang="
var s = "This is a story about R2D2 and C3P0 who are best friends."
Line 3,040:
{{libheader|Wren-regex}}
The above module uses RE2 regular expression syntax but, since it is a wrapper for Go's 'regexp' package, it can only be used from a special embedded application and not by Wren-cli.
<syntaxhighlight lang="
import "./regex" for Regex
|