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> |
|||
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} |
||
⚫ | |||
{18374} |
|||
⚫ | |||
</pre> |
|||
=={{header|MAXScript}}== |
=={{header|MAXScript}}== |