3 ms·
One alternative in the Wolfram Language is called StringExpresions. For instance, something like StringReplace["Mad Hatter", "M"|"H"~~a_~~b_..:>"B"<>a<>"g"]
by bobbylox 11y ago
One alternative in the Wolfram Language is called StringExpresions. For instance, something like
StringReplace["Mad Hatter", "M"|"H"~~a_~~b_..:>"B"<>a<>"g"]
returns "Bag Bager"
The nice thing is that a string expression can use a RegularExpression as part of the pattern, but it's often not neccesary.
- DannyBee 11y ago"The nice thing" Nothing in this post is a nice thing :)