Extracting text from a phrase

2002-09-17 Thread Ian
Hi, Please excuse this newbie question, but I am getting confused :( I need at have a small script that will extract selected words from a phrase and then insert them into a new string. I have an html page that I need to extract both urls keywords from and put them into a new file. Should be

Re: Extracting text from a phrase

2002-09-17 Thread James Edward Gray II
Why not try grabbing all the important stuff right out of the pattern, like my example below. Note: Your pattern may need changes if I assumed too much, from your examples. #!/usr/bin/perl while () { if (m!font class=fontclassza href=([^]+)([^]+)/a/font!) { print qq(a href=$1 target=_blank

RE: Extracting text from a phrase

2002-09-17 Thread Ian
Hi, Thank you but when I try and run that by doing a Perl script.pl file.shtml newfile.txt I am getting a blank output. Sorry if I did not explain myself correctly. There are multiple instances of this line in the one page, and I need to generate a simple text file to use for another

Re: Extracting text from a phrase

2002-09-17 Thread James Edward Gray II
That's because my match isn't matching anything. It's not very forgiving and anything so much as a space or case change in the wrong place could throw it off. Can you alter the match a little so it will catch the actual lines? James On Tuesday, September 17, 2002, at 10:58 AM, Ian wrote:

RE: Extracting text from a phrase

2002-09-17 Thread Kirby_Sarah
]] Sent: Tuesday, September 17, 2002 12:09 PM To: Ian Cc: [EMAIL PROTECTED] Subject: Re: Extracting text from a phrase That's because my match isn't matching anything. It's not very forgiving and anything so much as a space or case change in the wrong place could throw it off. Can you alter