Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > String Manipulation > String Patterns >
Mathematica > Core Language > Rules & Patterns > Patterns > String Patterns >
String Patterns
Mathematica's symbolic string patterns provide a compact yet readable basis for sophisticated string operations. Included directly in programs, or symbolically generated on the fly, Mathematica's string patterns can routinely be used on strings with millions of elements.
StringExpression a symbolic string-pattern expression ()
    
_ any character
__, ___ sequences of characters (one or more, zero or more)
p|p|p alternatives
p.., p... repeated patterns
x_, x:p named patterns
Shortest, Longest shortest, longest matches
Except matches that exclude a pattern
    
    
RegularExpression string patterns in regular expression notation
    
IgnoreCase option for whether to ignore case
Overlaps option for how to treat substring overlaps
    
StringFormat test the overall format of a string
TUTORIALS
TUTORIAL COLLECTION
MORE ABOUT
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF