Re: Split text file into words

2005-03-09 Thread Duncan Booth
qwweeeit wrote: >ll=re.split(r"[\s,{}[]()+=-/*]",i) The stack overflow comes because the ()+ tried to match an empty string as many times as possible. This regular expression contains a character set '\s,{}[' followed by the expression '()+=-/*]'. You can see that the parentheses aren't pa

Re: Split text file into words

2005-03-09 Thread qwweeeit
I thank you for your help. I already used re.split successfully but in this case... I didn't explain more deeply because I don't want someone else do my homework. I want to implement a variable & commands cross reference tool. For this goal I must clean the python source from any comment and manif

Re: Split text file into words

2005-03-08 Thread Duncan Booth
qwweeeit wrote: > The standard split() can use only one delimiter. To split a text file > into words you need multiple delimiters like blank, punctuation, math > signs (+-*/), parenteses and so on. > > I didn't succeeded in using re.split()... > Would you care to elaborate on how you tried to

Re: Split text file into words

2005-03-08 Thread Heiko Wundram
On Tuesday 08 March 2005 14:43, qwweeeit wrote: > The standard split() can use only one delimiter. To split a text file > into words you need multiple delimiters like blank, punctuation, math > signs (+-*/), parenteses and so on. > > I didn't succeeded in using re.split()... Then try again... ;)

Split text file into words

2005-03-08 Thread qwweeeit
The standard split() can use only one delimiter. To split a text file into words you need multiple delimiters like blank, punctuation, math signs (+-*/), parenteses and so on. I didn't succeeded in using re.split()... -- http://mail.python.org/mailman/listinfo/python-list