in reply to Re^2: Splitting on unusual regex
in thread Splitting on unusual regex
Something like this?
#! perl -slw use strict; my $code = <<EOC; This is some JOY code This is (some more) JOY code And this is some JOY code with escaped \\( and \\) like (this \\) and \\(this) and \\) EOC print for $code =~ m[ ( (?: \( (?: \\[()] | [^()] )+ \) ) | \S+ ) ]gx; __END__ C:\test>615217 This is some JOY code This is (some more) JOY code And this is some JOY code with escaped \( and \) like (this \) and \(this) and \)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Splitting on unusual regex
by dewey (Pilgrim) on May 14, 2007 at 08:45 UTC |