Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing information from a string

Status
Not open for further replies.

PEFL

Programmer
Nov 30, 2004
2
US
I would like to remove information from a string.

An Example:

Come visit us at etc etc etc.

I would like to remove the whole line:

But since you can have any name before the "." and any number after the word proboard...I have myself a little confused on how to do this.

Can anyone help me out?

Thanks in advance
PEFL
 
Just a guess.


s/http:\/\/.*?\.proboards.*\.com\/index\.cgi/ /g;
 
If you're just trying to pull out urls, try HTML::LinkExtor.
 
google
perl parse html

--Paul

Nancy Griffith - songstress extraordinaire,
and composer of the snipers anthem "From a distance ...
 
Nfaber,

That worked to some extent, but if I had another unrelated link, that was removed as wellj being that a following link with the .cgi end was in the same string.

Thanks
 
[tt]
s/http:\/\/[^ ]*\.proboards[^ ]*\.com\/index\.cgi/ /;
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top