Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Test whether an expression is valid string pattern
ResourceFunction["StringPatternQ"][expr] gives True if expr is a valid string pattern, suitable for use with e.g. StringMatchQ. |
Test any pattern:
In[1]:= |
Out[1]= |
In[2]:= |
Out[2]= |
In[3]:= |
Out[3]= |
More complex patterns:
In[4]:= |
Out[4]= |
In[5]:= |
Out[5]= |
A pattern not suitable for strings:
In[6]:= |
Out[6]= |
A regular expression:
In[7]:= |
Out[7]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License