in reply to Re: Splitting a string based on a regex
in thread Splitting a string based on a regex
If I understand your answer correctly (it's highly plausible that I don't !) you are suggesting that I split the line based on this regex ?(?-xism:(?ig:(?:create table ([a-z]|[_])+(?{$self->{m}=1})|insert \b([ +a-z]|[_])+\b (?{$self->{m}=3})|lock table(?{$self->{m}=0})|grant(?{$s +elf->{m}=2}))))
I'm only just past novice stage with Perl but that doesn't look right to me ?my @parts = split /(?=(?-xism:(?ig:(?:create table ([a-z]|[_])+(?{$sel +f->{m}=1})|insert \b([a-z]|[_])+\b (?{$self->{m}=3})|lock table(?{$se +lf->{m}=0})|grant(?{$self->{m}=2})))))/, $text;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Splitting a string based on a regex
by duff (Parson) on Feb 06, 2006 at 15:37 UTC | |
by Anonymous Monk on Feb 07, 2006 at 09:00 UTC | |
|
Re^3: Splitting a string based on a regex
by Anonymous Monk on Feb 06, 2006 at 15:33 UTC |