in reply to Stripping parenthesized test from beginning of a textarea string with regex

You are matching only whitespace in parens (\s eq. whitespace). What you want is
$input = "(here is words or numbers or dates) information starts here +etc..."; if($input =~ s/^\(([^\)]+)\)\s*// ) { print "deleted:$1\n"; print "rest:$input\n" } #output: # deleted:here is words or numbers or dates # rest:information starts here etc...


holli, /regexed monk/
  • Comment on Re: Stripping parenthesized test from beginning of a textarea string with regex
  • Download Code