Help for this page

Select Code to Download


  1. or download this
    $word = qr[[a-zA-Z']+];;
    $sep = qr[[ \t.,!?]+];;
    ...
    
    print $para =~ $re;;
    want to extract n words on either side of the match. I am sure modules
    + such as Plucene or KinoSearch already
    
  2. or download this
    $re = qr[((?:$word$sep){0,$n}\Q$match\E(?:$sep$word){0,$n})];;
    $match = 'CPAN';;
    
    print $para =~ m[$re];;
    There probably is already a CPAN module for this, but I am stuck tryin
    +g to figure