Referring to this question, which I found quite interesting. Can't test right now if Emacs supports possessive quantifiers. The manual says that lazy quantifiers are supported:
?, +?, ?? are non-greedy variants of the operators above. The normal operators ‘’, ‘+’, ‘?’ match as much as they can, as long as the overall regexp can still match. With a following ‘?’, they will match as little as possible...
But could not find anything about possessive quantifiers like ?+, *+, ++
For example on string ab.*+a|b would match b but .*a|b would match a.
Are possessive quantifiers supported in Emacs regex flavor?
No comments:
Post a Comment