Quantcast
Channel: Is there a difference between a (general) pattern and a string pattern? - Mathematica Stack Exchange
Browsing latest articles
Browse All 3 View Live

Answer by Daniel Huber for Is there a difference between a (general) pattern...

As Domen already pointed out, Pattern and StringExpression differ. Therefore, what you can do, is to use a pattern together with a PatternTest that request a boolean function. As boolean function you...

View Article



Answer by Domen for Is there a difference between a (general) pattern and a...

Yes, there is a difference. "A" ~~ ___ is not a pattern but a StringExpression, which you can see by observing its FullForm:"A" ~~ ___ // FullFormStringExpression["A",...

View Article

Is there a difference between a (general) pattern and a string pattern?

I have a list myList that contains several strings. I wish to use Position to find the positions of strings in myList that match the pattern "A" ~~ ___.The first overload for Position in the...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images