regex for multiple whitespace-only lines

P

Phil Mayes

I am trying to search for 1 or more empty or white-space-only lines.
Empty lines work:<_sre.SRE_Pattern object at 0x010F9218>

One line with possible whitespace works:<_sre.SRE_Pattern object at 0x010F7860>

Multiple lines with possible whitespace don't:Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python25\lib\re.py", line 180, in compile
return _compile(pattern, flags)
File "C:\Python25\lib\re.py", line 233, in _compile
raise error, v # invalid expression
error: nothing to repeat

Does anyone know a work-round?

Thanks,
Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top