Regular expressions: Difference between revisions

Content added Content deleted
m (→‎{{header|Tcl}}: formatting)
(added slate language)
Line 447: Line 447:
"was"
"was"
end)
end)

=={{header|Slate}}==

This library is still in its early stages. There isn't currently a feature to replace a substring.

<lang slate>
(Regex Matcher newOn: '^(([^:/?#]+)\\:)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?') `>> [match: 'http://slatelanguage.org/test/page?query'. subexpressionMatches]

"==> {"Dictionary traitsWindow" 0 -> 'http:'. 1 -> 'http'. 2 -> '//slatelanguage.org'. 3 -> 'slatelanguage.org'. 4 -> '/test/page'. 5 -> '?query'. 6 -> 'query'. 7 -> Nil}"

</lang>


=={{header|Smalltalk}}==
=={{header|Smalltalk}}==