Jump to content

Regular expressions: Difference between revisions

m
→‎{{header|NetRexx}}: Correct a spelling error.
m (→‎{{header|REXX}}: added a link to the CHANGESTR.REX subroutine. -- ~~~~)
m (→‎{{header|NetRexx}}: Correct a spelling error.)
Line 897:
say 'String "'st1'"' 'matches pattern "'rx1ef'":' Boolean(mcm)
say
say 'Replace all occurencesoccurrences of regex pattern "'rx1ef'" with "'sbx'"'
stx = Rexx
stx = (String st1).replaceAll(rx1ef, sbx)
Line 911:
mc1 = pt1.matcher(st1)
say
say 'Replace all occurencesoccurrences of regex pattern "'rx1'" with "'sbx'"'
sx1 = Rexx
sx1 = mc1.replaceAll(sbx)
Line 924:
String "Fee, fie, foe, fum, I smell the blood of an Englishman" matches pattern "(?i)f.e.*?": true
 
Replace all occurencesoccurrences of regex pattern "(?i)f.e.*?" with "foo"
Input string: "Fee, fie, foe, fum, I smell the blood of an Englishman"
Result string: "foo, foo, foo, fum, I smell the blood of an Englishman"
Line 930:
String "Fee, fie, foe, fum, I smell the blood of an Englishman" matches pattern "f.e.*?": true
 
Replace all occurencesoccurrences of regex pattern "f.e.*?" with "foo"
Input string: "Fee, fie, foe, fum, I smell the blood of an Englishman"
Result string: "foo, foo, foo, fum, I smell the blood of an Englishman"
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.