KW.pm
Regular Expressions
#7
Grouping and Alternation
You can use
|
to match a group of alternatives:
/parsley|sage|rosemary|thyme/
will match on any string containing one of those herbs
In combination with the grouping parentheses:
/Hello, (Mike|Jeff|Bill|Susan)!/ # I have problems with names.
<< Previous
|
Index
|
Next >>
Copyright © 2002
Christopher Calzonetti