Re: re.finditer() skips unicode into selection

2013-06-26 Thread darpan6aya
Thanks MRAB your alternative regex implementation worked flawlessly. It works now. -- http://mail.python.org/mailman/listinfo/python-list

Re: re.finditer() skips unicode into selection

2013-06-26 Thread darpan6aya
[IMG]http://i41.tinypic.com/35002rr.png[/IMG] Heres a screenshot http://i41.tinypic.com/35002rr.png -- http://mail.python.org/mailman/listinfo/python-list

Re: re.finditer() skips unicode into selection

2013-06-26 Thread darpan6aya
Thanks MRAB, your suggestion worked. But then it brought an error 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) I corrected this by encoding it to 'utf-8'. The code looks like this now. pattern = ur'(?u)\w+' def __init__(self, *args):

Re: re.finditer() skips unicode into selection

2013-06-26 Thread MRAB
On 26/06/2013 20:18, akshay.k...@gmail.com wrote: I am using the following Highlighter class for Spell Checking to work on my QTextEdit. class Highlighter(QSyntaxHighlighter): In Python 2.7, the re module has a somewhat limited idea of what a "word" character is. It recognises 'DEVANAGARI LET

Re: re.finditer() skips unicode into selection

2013-06-26 Thread Terry Reedy
On 6/26/2013 3:18 PM, akshay.k...@gmail.com wrote: I am using the following Highlighter class for Spell Checking to work on my QTextEdit. class Highlighter(QSyntaxHighlighter): pattern = ur'\w+' def __init__(self, *args): QSyntaxHighlighter.__init__(self, *args) self