in reply to Regexp - match if not between [ ]
If your \w\d+ pattern can be substituted by \w\d{3}, then this seems to work:
$s = 'The fox did it[ at 12.23 ] well, Cf. 23 A423.23. The swallow was + even better,';; print for split '(?<!Cf)(?<!\w\d{3})\.(?![^\]]+])', $s;; The fox did it[ at 12.23 ] well, Cf. 23 A423.23 The swallow was even better,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regexp - match if not between [ ]
by Anonymous Monk on May 30, 2011 at 14:26 UTC | |
by BrowserUk (Patriarch) on May 30, 2011 at 15:53 UTC |