The following matches in Idle, but does not match when run in a method in a module file:
import re re.search('\\bשלום\\b','שלום עולם',re.UNICODE) while the following matches in both cases:
import re re.search('שלום','שלום עולם',re.UNICODE) (Notice that stackoverflow erroneously switches the first and second items in the line above as this is a right to left language)
How can I make the first code match inside a py file?
Update: What I should have written for the first segment is that it matches in Idle, but does not match when run in eclipse console with PyDev.
re.LOCALEinstead of UNICODE? I'd install locale-he but am kind of afraid I'd never get it switched back. Off-topic: some say google translate goes too farapt-get install user-he; hebrew-settingsbecomesapt-get install user-en; english-settingswhich is impressive, but wrong ;)