Re: Grep help
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 58771
interpreted = N
texte = search= ([0-9]*)$replace=\t\1Thats a space before the parentheses. \t is a tab, you must use the %XX equivalent or an actual tab. The $ indicates line ending. Asterisk means as repeated. I forget if it means 0 or 1. If you need to distinguish for non-US postal codes and only 5 numbers, try:search= ([0-9][0-9][0-9][0-9][0-9])$-----Original Message-----From: Patrick McCormick
Sent: Tue, 13 Jul 2004 11:13:50 -0500To: "WebDNA Talk" Subject: Re: Grep helpExample:SPRING VALLEY IL 61362WARRENVILLE IL 60555WAUKEGAN IL 60079The source is separated by spaces.On Jul 13, 2004, at 11:05 AM, Patrick McCormick wrote:> I need to replace a space between states and zip codes with a tab > character in a text file.>> Can anyone help a grep-challenged (lazy) coder?>> Pat>> -------------------------------------------------------------> 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/-------------------------------------------------------------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:
search= ([0-9]*)$replace=\t\1Thats a space before the parentheses. \t is a tab, you must use the %XX equivalent or an actual tab. The $ indicates line ending. Asterisk means as repeated. I forget if it means 0 or 1. If you need to distinguish for non-US postal codes and only 5 numbers, try:search= ([0-9][0-9][0-9][0-9][0-9])$-----Original Message-----From: Patrick McCormick Sent: Tue, 13 Jul 2004 11:13:50 -0500To: "WebDNA Talk" Subject: Re: Grep helpExample:SPRING VALLEY IL 61362WARRENVILLE IL 60555WAUKEGAN IL 60079The source is separated by spaces.On Jul 13, 2004, at 11:05 AM, Patrick McCormick wrote:> I need to replace a space between states and zip codes with a tab > character in a text file.>> Can anyone help a grep-challenged (lazy) coder?>> Pat>> -------------------------------------------------------------> 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/-------------------------------------------------------------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/
devaulw@onebox.com
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:
Problems searching from a FORM (1997)
Displaying photo attached to first record (1997)
Next X hits (1996)
Opinion: [input] should be called [output] ... (1997)
[SHOWIF] (1997)
SQL on OSX Client (2001)
For those of you not on the WebCatalog Beta... (1997)
Substitutes for [text]? (2000)
Almost a there but..bye bye NetCloak (1997)
Initiating NewCart (1997)
BBEdit and WebCatalog 2.0? (1997)
Attention SM: Trigger Bug? (2000)
RE: Clearing orders and database help! (1997)
WebCatalog 4.0.2rc1 and rc2 crash WebSTAR on quit (2001)
international time (1997)
2.0 Info (1997)
Sort Order on a page search (1997)
[OT] HTML, HTML docs (2001)
Size/Color Options (2002)
carrying values forward (1998)