Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    use Data::Dumper ();
    ...
    lookahead/lookbehind, but they don't capture.  Is there a way
    to do this with a single regex?  Is a regex even the best way
    to do this?  Thanks, -Lee
    
  2. or download this
    perl -Mstrict -Mwarnings context.pl is and the have
    $matched = [
    ...
      'a single regex?  [Is] a regex even [the] best way
    to do this'
    ];
    
  3. or download this
    \b              # a word boundary
    (?!\s)          # following char is not a white space (1)
    ...
        \b          #    up to the next word boundary
      )
    )