Re: Grep -- remove extra returns first
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 52123
interpreted = N
texte = [grep search=(http://[^ %0D%0A%0B]*)&replace=
\1][mystring][/grep]This works for me.on 8/8/03 2:23 AM, Jesse Williams-Proudman at j.list@blueboxcode.com wrote:> On 8/7/03 11:15 PM, "William DeVaul"
wrote:> >> Mystring=asdfaf>> Asdf>> Aaa http://www.cnn.com ad>> Asd>> >> Grepping mystring at the terminal for http://[^ ] will return only the line:>> Aaa http://www.cnn.com ad>> >> Grepping mystring in Web Cat returns all of mystring plus or minus any>> replacements. If grepped as above, Web Cat returns:>> asdfaf>> Asdf>> Aaa http://www.cnn.com ad>> Asd> > Ok, taking your example, try your grep on this test:> > Mystring=asdfaf> Asdf> Aaa http://www.cnn.com ad> Asd> http://www.cnn.com> Adsadf> Asd> Asds http://www.cnn.com> > It will catch the first cnn.com but not the second or the third because they> are followed by returns and not spaces. That's my problem.-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
[grep search=(http://[^ %0D%0A%0B]*)&replace=\1][mystring][/grep]This works for me.on 8/8/03 2:23 AM, Jesse Williams-Proudman at j.list@blueboxcode.com wrote:> On 8/7/03 11:15 PM, "William DeVaul" wrote:> >> Mystring=asdfaf>> Asdf>> Aaa http://www.cnn.com ad>> Asd>> >> Grepping mystring at the terminal for http://[^ ] will return only the line:>> Aaa http://www.cnn.com ad>> >> Grepping mystring in Web Cat returns all of mystring plus or minus any>> replacements. If grepped as above, Web Cat returns:>> asdfaf>> Asdf>> Aaa http://www.cnn.com ad>> Asd> > Ok, taking your example, try your grep on this test:> > Mystring=asdfaf> Asdf> Aaa http://www.cnn.com ad> Asd> http://www.cnn.com> Adsadf> Asd> Asds http://www.cnn.com> > It will catch the first cnn.com but not the second or the third because they> are followed by returns and not spaces. That's my problem.-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
William DeVaul
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Using Cookie for client specific info? (1997)
[WebDNA] Mistake in web page instructions (2009)
Candle Light Vigil (2001)
WebCat 3.04-3.07 plug-in dying on server.... (2000)
Multiple Newcarts (1996)
Web Developer Product Awards (1997)
Search design (1997)
RE: Credit card processing - UK (1997)
Buying sans cart (1997)
Caching [include] files ... (1997)
[OT] XML Primer (2004)
[WebDNA] Searching for multiple bits of data in one field or use (2016)
Looking for Paul @ Netro42??? (2000)
search form problem.. (1997)
Anyone have an invoicing system? (1999)
Permissions (2000)
Grant, please help me ... (1997)
ShowNext (1997)
Universal root for WC errors? (1997)
WCS Newbie question (1997)