newbie question: parse a variable inside an RE?

2008-12-01 Thread joemacbusiness
Hi All, How do I parse a variable inside an RE? What is the re.search() syntax when your search string is a variable? It's easy to parse hardcoded RE's but not if you use a variable. Here is my code, input and runtime: $ cat test45.py #!/usr/bin/python import re resp = raw_input('Selection:

Re: newbie question: parse a variable inside an RE?

2008-12-01 Thread Vlastimil Brom
2008/12/1 [EMAIL PROTECTED] Hi All, How do I parse a variable inside an RE? What is the re.search() syntax when your search string is a variable? It's easy to parse hardcoded RE's but not if you use a variable. Here is my code, input and runtime: $ cat test45.py #!/usr/bin/python

Re: newbie question: parse a variable inside an RE?

2008-12-01 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: Hi All, How do I parse a variable inside an RE? What is the re.search() syntax when your search string is a variable? It's easy to parse hardcoded RE's but not if you use a variable. Both are exactly equal in difficulty. Here is my code, input and runtime: $ cat

Re: newbie question: parse a variable inside an RE?

2008-12-01 Thread John Machin
On Dec 2, 8:56 am, Diez B. Roggisch [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] schrieb: Hi All, How do I parse a variable inside an RE? What is the re.search() syntax when your search string is a variable? It's easy to parse hardcoded RE's but not if you use a variable. Both are