in reply to Using a regex to catch interpreters
s/^>>>(?!>)(?![^\n]*\n>>(?!>))/PYTHON_PROMPT/gm;
Also, I'd prefer to avoid $1 if possible, for performance reasons.That's a strange remark. You're willing to use regexes, and even Perl, but not $1, "for performance reasons". Apparently, performance is very important to you. In that case, you ought to use C - what you want to do isn't too hard in C.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Using a regex to catch interpreters
by eastcoastcoder (Sexton) on Jul 06, 2005 at 14:53 UTC | |
by ikegami (Patriarch) on Jul 06, 2005 at 18:05 UTC | |
by eastcoastcoder (Sexton) on Jul 06, 2005 at 17:34 UTC | |
|
Re^2: Using a regex to catch interpreters
by eastcoastcoder (Sexton) on Jul 07, 2005 at 17:30 UTC |