I dont want to imagine how annoying is to have a newbie asking question to gurus but the other forums, just did not bloody work i could not get logged in, i would get "akismetspam" sentence not found, and there was nothing for me to answer, well it was rubbish, so, sorry to bug you, I promise it will be just 1 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
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.
if ($line =~ /<a href="page.aspx?.*>.*</a>$/
it would have to remove all the junk I dont want and print just the remaining hmm
$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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||