[wellylug] Regex, replace stuff in command line help...
Jo Booth
thegeek at mangee.net.nz
Fri Jun 30 07:25:10 NZST 2006
On 29/06/2006, at 11:51 , David Antliff wrote:
> $ echo '<a href="url or relative link/profile?u=mangee">' | perl -
> nle '/profile\?u=(.*)/ && print "[$1]"'
> [mangee">]
>
>
> $ echo '<a href="url or relative link/profile?u=mangee">' | perl -
> nle '/profile\?u=(.*?)/ && print "[$1]"'
> []
It seemed to work (and yes I added an anchor of \" at the end) - but
I realised that it only seems to be getting the usernames from the
first few lines (which have a user name on separate lines) - the last
part of each html has the user-names in one huge long line - it seem
to get the first one - but not the rest....
Any ideas for multiple matches per line? I tried manually adding
returns and it got a few more - but there are a few files to process :)
Thanks for all your help (all of you)
Jo Booth
Unlimited Potential
http://up.org.nz
What's UP? - 5th July!
+64 21 526684
More information about the wellylug
mailing list