:

On 25 October 2012 16:53, Rivka Miller <rivkaumil...@gmail.com> wrote:
> I am looking for a regexp for a string not at the beginning of the
> line.

There are probably quite a few ways to do this, but '(?<!^)PATTERN'
has the advantage of explicitly describing what you're trying to do.
For instance:

>>> pattern = re.compile(r"(?<!^)\b\w+\b")
>>> re.findall(pattern, "this is some text")
['is', 'some', 'text']

 -[]z.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to