[Merged!] [MERGE][1.6] Update repo description strings

Harald Meland harald.meland at usit.uio.no
Mon Aug 18 10:38:35 BST 2008


[Vincent Ladeuil]

>>>>>> "john" == John Arbash Meinel <john at arbash-meinel.com> writes:
>
> <snip/>
>
>     john> So, it seems that Python's regex engine doesn't support
>     john> "\>" and "\<" which are: match at the end of a word, and
>     john> match at the beginning of a word, respectively.
>
>     john> However, it does have '\b' which is "match at a word boundary".
>
> In most cases you get a good approximation with:
>
> \< == \W\b
> \> == \b\W

In this particular case (and, in my experience, most other cases) the
regexp text already has an explicit word-character before the \b
(i.e. "\[merge\b"), so that trick wouldn't be necessary.

However, if one needs python-regexp-compatible equivalents, I think

  \< == \b(?=\w)
  \> == (?<=\w)\b

should be full-equivalents.
-- 
Harald



More information about the bazaar mailing list