#!/usr/bin/perl -w use strict; my $str = 'DPL1 DPLx RVLj ILKy VLKy Bartleby the ScriFVKner'; while ($str=~ /(DPL.|RVL.|[IV]LK.|FVK.)/g){ print "matched '$1' in string '$str'\n"; }
In reply to Re: use of 'or' in regex
by mrbbking
in thread use of 'or' in regex
by Becky
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |