Regular expressions: Difference between revisions

m
→‎{{header|REBOL}}: Fixed spelling errors. How embarrassing.
(Added Oz solution.)
m (→‎{{header|REBOL}}: Fixed spelling errors. How embarrassing.)
Line 541:
; Here, I provide a rule to 'parse' that specifies searching through
; the string until "string." is found, then the end of the string. If
; the subject string satisfies the rule, the expresionexpression will be true.
 
if parse string [thru "string." end] [
print "Subject ends with 'string.'"]
 
; For replacmentreplacement, I take advantage of the ability to call arbitrary
; code when a pattern is matched -- everything in the parens will be
; executed when 'to " a "' is satisfied. This marks the current string
Anonymous user