[Gllug] matching strings in python
Richard W.M. Jones
rich at annexia.org
Sun Oct 2 09:28:14 UTC 2011
On Sun, Oct 02, 2011 at 09:36:08AM +0100, dudes dudes wrote:
> if re.match('(10000)' | '(10001)', line)
Test that the program you are posting compiles first. Avoids wasting
everyone else's time on something that you could have fixed yourself.
You probably want to match on: "1000[01]".
Rich.
--
Richard Jones
Red Hat
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list