Quantcast
Channel: Active questions tagged string-manipulation - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 188

Problem with WordBoundary in string patterns

$
0
0

I am trying to extract from a string all words that end with "-man", but the problem is that WordBoundary does not seem to work as it returns whole string ignoring actual word boundaries.

Here is the code:

mystring = "I am a big fan of Superman, Spiderman and Batman.";StringCases[mystring, WordBoundary ~~ __ ~~ "man"];

Viewing all articles
Browse latest Browse all 188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>