[Tutor] Regular expressions - Ignoring linefeeds

Kent Johnson kent37 at tds.net
Fri Mar 2 20:25:43 CET 2007

Luke Paireepinart wrote:
> Kent Johnson wrote:
>> Luke Paireepinart wrote:
>>> Your RE is wrong.
>>> Refer to http://docs.python.org/lib/re-syntax.html
>>> * Causes the resulting RE to match 0 or more repetitions of the 
>>> preceding RE, as many repetitions as are possible. ab* will match 
>>> 'a', 'ab', or 'a' followed by any number of 'b's.
>> The RE that is repeated is . which is the intent.
> Yeah, sorry.  I thought there was a space after the ., which wouldn't 
> work, right?

Right, if there was a space, the space would be the repeated item.


More information about the Tutor mailing list