emelianenko has asked for the wisdom of the Perl Monks concerning the following question:
I have a paragraph like this:
<a href="page.aspx?a=c4bc46eswsdw32fcc">John.Martines </a></li><li><a +href="page.aspx?a=0a2b-a99d-3754eb2f5e35">Mary Jones</a></li><li><a h +ref="page.aspx?a=1ef7b100-8dc4-4b40-871c-68b1d0">Fernando Praderas</a +></li><li><a href="page.aspx?a=e8ec1d77-ee83-4797-b9c4-7676053a4926">
I just want to print the First and last name that you see scattered there but always between the same patterns. But if I am to tell the program to read line by line, they are differently divided, some times the content to print is split between two lines or some times is in the second line.
it would have to remove all the junk I dont want and print just the remaining hmm so:if ($line =~ /<a href="page.aspx?.*>.*</a>$/
$line =~s/(<a href="page.aspx?*>$//.*s/</a>//
that is, replace that by nothing, so remove it, then I was thinking I am also removing the final leaving $line = to the name but...I dont think I am doing well. i only saw regex 10 years ago for two weeks and re-took it today... Any help would be strongly appreciated. regards</code>