in reply to Stripping parenthesized test from beginning of a textarea string with regex
$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...
|
|---|