The regex /(Sam|Samwise)/ will never match Samwise because Sam will match first. Use /(Samwise|Sam)/ instead.
Replying to @RegexTip
Good tip. It only applies to regex engines with "leftmost first" semantics though (such as Perl regexes). In POSIX regexes, "leftmost longest" is used instead, such that 'Sam|Samwise' and 'Samwise|Sam' are equivalent.pic.twitter.com/dfJ21UP297
0 replies
1 retweet
14 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.