Quantcast
Channel: StringMatchQ fails using Alternatives with complex pattern - Mathematica Stack Exchange
Browsing all 2 articles
Browse latest View live

Answer by m_goldberg for StringMatchQ fails using Alternatives with complex...

The problem arises from naming the inner sub-patterns in your two pattern definitions with the same identifier. When you combine the patterns with Alternatives, you then have a pattern with two...

View Article



StringMatchQ fails using Alternatives with complex pattern

Alternatives seems to work fine with these simple patternsStringMatchQ["Eric", Alternatives["Eric", "Geoff"]] (* True *)StringMatchQ["Eric", Alternatives["Geoff", "Eric"]](* True *)I have a more...

View Article
Browsing all 2 articles
Browse latest View live


Latest Images