Regular expressions: Difference between revisions

Content added Content deleted
m (→‎{{header|C++}}: format fix)
Line 1,500: Line 1,500:
"Maple is Canadian"</pre>
"Maple is Canadian"</pre>


=={{header|Mathematica}}==
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<lang Mathematica>StringCases["I am a string with the number 18374 in me",RegularExpression["[0-9]+"]]
<lang Mathematica>
StringCases["I am a string with the number 18374 in me",RegularExpression["[0-9]+"]]
StringReplace["I am a string",RegularExpression["I\\sam"] -> "I'm"]</lang>
StringReplace["I am a string",RegularExpression["I\\sam"] -> "I'm"]
</lang>
The in-notebook output, in order:
The in-notebook output, in order:
<pre>
<pre>{18374}
I'm a string</pre>
{18374}
I'm a string
</pre>


=={{header|MAXScript}}==
=={{header|MAXScript}}==