Regular expressions: Difference between revisions

m
m (→‎{{header|C++}}: format fix)
Line 1,500:
"Maple is Canadian"</pre>
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>StringCases["I am a string with the number 18374 in me",RegularExpression["[0-9]+"]]
<lang Mathematica>
StringCasesStringReplace["I am a string with the number 18374 in me",RegularExpression["[0I\\sam"] -9]+> "I'm"]]</lang>
StringReplace["I am a string",RegularExpression["I\\sam"] -> "I'm"]
</lang>
The in-notebook output, in order:
<pre>{18374}
I'm a string</pre>
{18374}
I'm a string
</pre>
 
=={{header|MAXScript}}==
1,111

edits