Hi Monks
I am trying to split a string using regex.Here is the code i tried and the output that i get and the output i want.
#!/usr/bin/perl my $var='Aur S-P 250 Pre (Chlorine + cillin (cilli G caine) + Sulfate) +'; my @pos=split(/\s\(/,$var); for(@pos) { print "$_\n"; }
output i get
Aur S-P 250 Pre Chlorine + cillin cilli G caine) + Sulfate)
output i want
Aur S-P 250 Pre Chlorine + cillin (cilli G caine) + Sulfate
In reply to regex splitting by Ratna_Ranjan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |