Simple Regular Expression Needed...

Yin yin_12180 at yahoo.com
Tue Oct 8 17:28:57 EDT 2002


I am parsing the following html strings:

<input>YOUNG J      STRONG   309   1356   1994
<input>FELDMAN DJ   WEAK  15    297    1962

I would like a regular expression to return the following for matches:
('YOUNG J      STRONG   309   1356   1994', 'FELDMAN DJ   WEAK  15   
297    1962')

CONSTRAINTS:
   1. newlines can't be used in the expression.
   2. spacing between numbers and text may not be preserved.

The actual problem is a little more complex, but the spirit of it I
think is preserved in this example.  Any thoughts?

Thanks.



More information about the Python-list mailing list