H'lo, g'morning Perl People - and Merry Christmas!

I've got a couple quickie questions that are messing me up. They
should be relatively easy, but I guess since I've been up since
YESTERDAY working on this, my brain isn't cooperating now. I'm no
master programmer, I'm just trying to modify a script I bought to be,
well, BETTER.

1) If my program gets a result in a string, and the string's value is:

Quincy, IL; Heath, OH; Bowling Green, KY; Muncie, IN; Paducah, KY; Gastonia, NC

How do make it so that the strings value is only those cities in Kentucky?
(the string would now be set to just "Bowling Green, KY; Paducah, KY")

2) A string is being set, and the result is a date, and the date comes back
a couple of different ways:

12/23/2002 Dec 23 12/23

and I want it to always be like the first value, 12/23/2002. If it's in the
format 12/23/2002, leave it alone. If it's not, and change it to where it
IS. How can this be done?

And the third, the worse one, it's parsing input received, and it's like
this:

while($content =~ m|<td valign=\"top\" class=\"list-item-odd\"><a href=\"(.*?)\" class=\"list-item-title\"><b>(.*?)</b></a><br>([\w\W]*?)<td valign=\"top\" class=\"list-item-odd\">(.*?)<br>([\w\W]*?)<td valign=\"top\" class=\"list-item-odd\">(.*?)</td>([\w\W]*?)<td valign=\"top\" class=\"list-item-odd\">(.*?)</td>|igmo) {


But the value, every EVEN time, which it's therefore missing (I'm assuming)
looks like this:

while($content =~ m|<td valign=\"top\" class=\"list-item\"><a href=\"(.*?)\" class=\"list-item-title\"><b>(.*?)</b></a><br>([\w\W]*?)<td valign=\"top\" class=\"list-item\">(.*?)<br>([\w\W]*?)<td valign=\"top\" class=\"list-item\">(.*?)</td>([\w\W]*?)<td valign=\"top\" class=\"list-item\">(.*?)</td>|igmo) {


What could the line look like if it was only looking for list-item in the line
with everything else, no matter if its a line with list-item-odd or not?

Thank you so very much! I've been working on these modifications and working
on them, but I need sleep badly, so I'm giving up and flat out asking for
help in solving it. Thank you, I appreciate your time.

Merry Christmas,

Steve


_______________________________________________
Perl-Unix-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to