Regexp for a string not at the beginning of the line
Devin Jeanpierre
jeanpierreda at gmail.com
Fri Oct 26 01:08:06 EDT 2012
More information about the Python-list mailing list
Fri Oct 26 01:08:06 EDT 2012
- Previous message (by thread): Quickie - Regexp for a string not at the beginning of the line
- Next message (by thread): Quickie - Regexp for a string not at the beginning of the line
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Oct 25, 2012 at 10:00 PM, Ed Morton <mortonspam at gmail.com> wrote: > Because there is no solution - there IS no _RE_ that will match a string not > at the beginning of a line. Depending on what the OP meant, the following would both work: - r"^(?!mystring)" (the string does not occur at the beginning) - r"(?!^)mystring" (the string occurs elsewhere than the beginning) [Someone else's interpretation] Both are "regular expressions" even in the academic sense, or else have a translation as regular expressions in the academic sense. They're also Python regexps. So I don't know what you mean. -- Devin
- Previous message (by thread): Quickie - Regexp for a string not at the beginning of the line
- Next message (by thread): Quickie - Regexp for a string not at the beginning of the line
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list