Quickie - Regexp for a string not at the beginning of the line
Mark Lawrence
breamoreboy at yahoo.co.uk
Thu Oct 25 22:37:23 EDT 2012
On 25/10/2012 21:53, Rivka Miller wrote:
> Hello Programmers,
>
> I am looking for a regexp for a string not at the beginning of the
> line.
>
Why bother with a silly regex thingy when simple string methods will
suffice e.g.
'yourstring'.find('xyz', 1)
or
'yourstring'.index('xyz', 1)
or
'xyz' in 'yourstring'[1:]
--
Cheers.
Mark Lawrence.
More information about the Python-list
mailing list