in reply to split string at variable position with matching
$ perl -le'$string = "hello my * name is Rob * and * I am a very nice +person * at least * I think * so"; print $string; ( $left, $right ) = + $string =~ / ^ ( .{1,30} \* ) \s* ( .+ ) /x; print for $left, $right +' hello my * name is Rob * and * I am a very nice person * at least * I +think * so hello my * name is Rob * and * I am a very nice person * at least * I think * so
|
|---|