H
Harlin Seritt
I have been looking at the Python re module and have been trying to
make sense of a simple function that I'd like to do. However, no amount
of reading or googling has helped me with this. Forgive my
stone-headedness. I have done this with .NET and Java in the past but
damn if I can't get it done with Python for some reason. As such I am
sure it is something even simpler.
I am trying to find some matches and have them put into a list when
processing is done. I'll use a simple example like email addresses.
My input is the following:
wordList = ['myname1', '(e-mail address removed)', '(e-mail address removed)',
'myname4@domain', '(e-mail address removed)']
My regular expression would be something like '\w\@\w\.\w' (I realize
it could and should be more detailed but that's not the point for now).
I would like to find out how to output the matches for this expression
of my 'wordList' into a neat list variable. How do I get this done?
Thanks,
Harlin Seritt
make sense of a simple function that I'd like to do. However, no amount
of reading or googling has helped me with this. Forgive my
stone-headedness. I have done this with .NET and Java in the past but
damn if I can't get it done with Python for some reason. As such I am
sure it is something even simpler.
I am trying to find some matches and have them put into a list when
processing is done. I'll use a simple example like email addresses.
My input is the following:
wordList = ['myname1', '(e-mail address removed)', '(e-mail address removed)',
'myname4@domain', '(e-mail address removed)']
My regular expression would be something like '\w\@\w\.\w' (I realize
it could and should be more detailed but that's not the point for now).
I would like to find out how to output the matches for this expression
of my 'wordList' into a neat list variable. How do I get this done?
Thanks,
Harlin Seritt