regex - Using end of word mark with unicode in regular expressions in Python -
is inactive in the following matches, but does not match if a module runs in a file in a file:
< Pre> import re-search ('\\ b שלום \\ b', 'שלום עולם', re.UNICODE)
While in both cases the following matches:
import re-research ('שלום', 'שלום עולם', re.UNICODE)
(Note that the stack overflow is the first and second switch from the fault
Update: Write to me the first section
That match is inactive, but when the eclipse with PyDev does not match to run in the console.
seems to work for me when I am using Unicode strings:
# - * - coding: UTF-8 - * - Import re-match = R. search (U '\ \ bhelm \\ b', U 'שלום עולם', re.U)
See it in action:
Comments
Post a Comment