Re: multiple pattern regular expression

2008-04-28 Thread micron_make
each of the suggested methods fit in. I have started trying them. -Rohit -- View this message in context: http://www.nabble.com/multiple-pattern-regular-expression-tp16895148p16936657.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://mail.python.org/mailma

multiple pattern regular expression

2008-04-25 Thread micron_make
I am trying to parse a file whose contents are : parameter=current max=5A min=2A for a single line I used for line in file: print re.search("parameter\s*=\s*(.*)",line).groups() is there a way to match multiple patterns using regex and return a dictionary. What I am looking for is (pse