Re: Explanation of G Modifier

2004-04-05 Thread WC -Sx- Jones
gohaku wrote: "What good is \G in a regular expression?" while (<>) { chomp; PARSER: { m/ \G( \d+\b)/gcx&& do { print "number: $1\n"; redo; }; m/ \G( \w+ )/gcx&& do { print "word: $1\n"; redo; }; m/ \G( \s+ )/gcx&& do { print "space: $1\n"; redo; };

Re: Explanation of G Modifier

2004-04-05 Thread Randy W. Sims
WC -Sx- Jones wrote: gohaku wrote: Hi everyone, Sorry for asking this question again for what must be the umpteenth time but I have a problem with the g modifier when matching. I have read Newsgroup Postings about this topic including: "What good is \G in a regular expression?" G is likely be

Re: Explanation of G Modifier

2004-04-04 Thread Randy W. Sims
WC -Sx- Jones wrote: gohaku wrote: Hi everyone, Sorry for asking this question again for what must be the umpteenth time but I have a problem with the g modifier when matching. I have read Newsgroup Postings about this topic including: "What good is \G in a regular expression?" G is likely be

Re: Explanation of G Modifier

2004-04-04 Thread WC -Sx- Jones
gohaku wrote: $src = "a 1 b 2 c 3"; $_ = "a 1 b 2 c 3"; print "I see numbers" if /(?!\d)/; __END__ Or /(?!\w)/ et al... Maybe /pattern/sgi isn't what you want for your test? -Sx- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Explanation of G Modifier

2004-04-04 Thread WC -Sx- Jones
gohaku wrote: Hi everyone, Sorry for asking this question again for what must be the umpteenth time but I have a problem with the g modifier when matching. I have read Newsgroup Postings about this topic including: "What good is \G in a regular expression?" G is likely best for s/// syntax as