Re: Grep Help
This WebDNA talk-list message is from 2007
It keeps the original formatting.
numero = 69255
interpreted = N
texte = Olin,That's a way of approaching it (elegant) but I think it isnt going to work.First I think that will only catch the first occurrence of the numbers andthese numbers are buried in a MSSQl text field.So for example I could see text that looks like this:-----------------------"These tickets have been resolved. You can find references to other itemsrelating to this occurrence at tn-2345, and tn-657898. Please let me know ifthere are any issues"-----------------------And I thought I could use the grep to find each occurrence and return themas a link to the reference number.Does this make sense?I despise grep.AlexOn 9/7/07 5:00 PM, "Olin Lagon"
wrote:> Here is a quick function that you can use to do what you want> > [function name=formatTN]> [return] href="http://someaddress.com/file.tpl?TN=[/return]> [return][middle startAfter=-][tn][/middle]">[middle> startAfter=-][tn][/middle][/return]> [return][/return]> [/function]> > Just put this function in your page on in an include file then call as> follows:> > [formatTN tn=TN-3456]> > Will work for anything TN-XXXX> > Easy to tweak the function as needed without using grep.> > Laters, Olin> > -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of Alex> McCombie> Sent: Friday, September 07, 2007 10:34 AM> To: WebDNA Talk> Subject: Grep Help> > This just isnt working for me and I admit grep is not my strong point.> > > I need to grep a text string that looks like> > TN-3456> Into> 3456> > > Where the digit can be any number of characters but the TN- will be> consistent.> > I know I need to strip the word with getchars starting @ 4 but cant figure> out the grep part.> > Probably pretty simple but since there is so much chatter here lately I> though I would throw this out ;-)> > Thanks> Alex> > > > Alex J. McCombie .> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .> Adventure Skies Interactive> Box 124 Martville, NY 13111> p. 315 .233 .9403> e. Alex@AdventureSkies.com> www.AdventureSkies.com> > > > > -------------------------------------------------------------> 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/> > > -------------------------------------------------------------> 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/Alex J. McCombie ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Adventure Skies InteractiveBox 124 Martville, NY 13111p. 315 .233 .9403e. Alex@AdventureSkies.comwww.AdventureSkies.com-------------------------------------------------------------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:
Olin,That's a way of approaching it (elegant) but I think it isnt going to work.First I think that will only catch the first occurrence of the numbers andthese numbers are buried in a MSSQl text field.So for example I could see text that looks like this:-----------------------"These tickets have been resolved. You can find references to other itemsrelating to this occurrence at tn-2345, and tn-657898. Please let me know ifthere are any issues"-----------------------And I thought I could use the grep to find each occurrence and return themas a link to the reference number.Does this make sense?I despise grep.AlexOn 9/7/07 5:00 PM, "Olin Lagon" wrote:> Here is a quick function that you can use to do what you want> > [function name=formatTN]> [return] href="http://someaddress.com/file.tpl?TN=[/return]> [return][middle startAfter=-][tn][/middle]">[middle> startAfter=-][tn][/middle][/return]> [return][/return]> [/function]> > Just put this function in your page on in an include file then call as> follows:> > [formatTN tn=TN-3456]> > Will work for anything TN-XXXX> > Easy to tweak the function as needed without using grep.> > Laters, Olin> > -----Original Message-----> From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com] On Behalf Of Alex> McCombie> Sent: Friday, September 07, 2007 10:34 AM> To: WebDNA Talk> Subject: Grep Help> > This just isnt working for me and I admit grep is not my strong point.> > > I need to grep a text string that looks like> > TN-3456> Into> 3456> > > Where the digit can be any number of characters but the TN- will be> consistent.> > I know I need to strip the word with getchars starting @ 4 but cant figure> out the grep part.> > Probably pretty simple but since there is so much chatter here lately I> though I would throw this out ;-)> > Thanks> Alex> > > > Alex J. McCombie .> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .> Adventure Skies Interactive> Box 124 Martville, NY 13111> p. 315 .233 .9403> e. Alex@AdventureSkies.com> www.AdventureSkies.com> > > > > -------------------------------------------------------------> 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/> > > -------------------------------------------------------------> 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/Alex J. McCombie ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Adventure Skies InteractiveBox 124 Martville, NY 13111p. 315 .233 .9403e. Alex@AdventureSkies.comwww.AdventureSkies.com-------------------------------------------------------------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/
Alex McCombie
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:
[ReturnRaw] and hiding FORM data (2003)
ReturnRaw Returns (2000)
filtering [founditems] (2004)
Merchant and WebCat 3.0 (1998)
PSC recommends what date format yr 2000??? (1997)
For those of you not on the WebCatalog Beta... (1997)
User/pass with tcpconnect (2000)
WebCatalog f2 Installation (1997)
2 databases problem (1997)
Protecting Files (2005)
Re:How to Display text in empty fields (1997)
Emailer help....! (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems (1997)
ConvertWords (2002)
writefile, csv, tab and excel import behavior (2004)
BinaryBody problem ...... (2003)
Deleting Orders (1997)
WebCat2 several catalogs? (1997)
Typhoon Rev. and PCS store problems (1999)
send mail problem? (1997)