http://www.perlmonks.org?node_id=1001767


in reply to Regex word options

Not exactly as you stated the problem, but an extensible approach:

C:\>perl -E "my @work=(\"I Arranged a meet.\", \"Transcribe this\"); for $work(@work) { if ($work =~ /Transcribe||Arranged/) { say $work; } } I Arranged a meet. Transcribe this C:\>

The \b does nothing useful as you state your problem; alternation is better done with an ||, ("or"). Solving the captures as you need them is left as an exercise.