How to match where the search started?
Florian Kaufmann
sensorflo at gmail.com
Tue Sep 28 04:10:07 EDT 2010
More information about the Python-list mailing list
Tue Sep 28 04:10:07 EDT 2010
- Previous message (by thread): tix problem in ubuntu karmic
- Next message (by thread): How to match where the search started?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>From the documentation: 7.2.4. Regular Expression Objects, search(string[, pos[, endpos]]) ... the '^' pattern character matches at the real beginning of the string and at positions just after a newline, but not necessarily at the index where the search is to start.... But I'd like to do just that. In Emacs regexps, I think the closest equivalent would be \=. Then I could do something like that, and also find directly adjacent matches reo = re.compile( r'(\=|...)...' ); while True mo = reo.search(text,pos) if not mo: break ... Flo
- Previous message (by thread): tix problem in ubuntu karmic
- Next message (by thread): How to match where the search started?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list