I need to extract the quoted text from :
_("get this")

The following works:
re.compile( "_\(['\"]([^'\"]+)['\"]\)" )
However, I don't want to match if there is A-Z or a-z or 0-9 or _ 
immediately preceding the "_" so I have tried:
"[^0-9a-zA-Z]*_\(['\"]([^'\"]+)['\"]\)"
"[^\w]{0,1}_\(['\"]([^'\"]+)['\"]\)"
"\W*_\(['\"]([^'\"]+)['\"]\)"

to match against:
skip this text _("get this")

Thanks 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to