Re: Dynamic Conversion

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 38770
interpreted = N
texte = Nitai @ ComputerOil wrote: > > Hi all, > > I got a text file from a client that wants to put his items online. This is > a industry company so they have some special chars in their product > descriptions, like [1/4], meaning 1/4 or the [/N] meaning N. > > The point is that all those chars may be different. Sometimes [/N] is a > [/Q], or [1/4/] is a [5/8], etc. > Deal with the second one first:[grep search=\[\/(.)\]&replace=\1][fieldtotest][/grep]Then the first one is trivial (get rid of the extra brackets):[grep search=\[(.)\]&replace=\1][fieldtotest][/grep]You can nest these two if needed (the second around the first). If you want to be really fancy, you can use grep to pull out the numerator and denominator of the fraction and use HTML formatting to display it as a fraction.HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Dynamic Conversion (John Peacock 2001)
  2. Dynamic Conversion (Nitai @ ComputerOil 2001)
Nitai @ ComputerOil wrote: > > Hi all, > > I got a text file from a client that wants to put his items online. This is > a industry company so they have some special chars in their product > descriptions, like [1/4], meaning 1/4 or the [/N] meaning N. > > The point is that all those chars may be different. Sometimes [/N] is a > [/Q], or [1/4/] is a [5/8], etc. > Deal with the second one first:[grep search=\[\/(.)\]&replace=\1][fieldtotest][/grep]Then the first one is trivial (get rid of the extra brackets):[grep search=\[(.)\]&replace=\1][fieldtotest][/grep]You can nest these two if needed (the second around the first). If you want to be really fancy, you can use grep to pull out the numerator and denominator of the fraction and use HTML formatting to display it as a fraction.HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- 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://search.smithmicro.com/ John Peacock

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:

linetiems in thankyou.tpl (1997) database size? (1997) keep W* in front applescript? (1998) country of origin from IPADDRESS??? (2001) Autoreturn Submit? (1997) Yet another db manager (2004) WebCat 4.0 (2000) Re:trouble (1997) Search multiple fields (1997) E-Mailer (WebCatb15acgiMac) (1997) Bug when including a db file & [platform] (2000) Weird problems with [SHOWIF]s (1997) Re:HELP - NONE STOP DIGESTS. Digest for 4/24/97) (1997) RE: Shopping Cart Questions (1998) WebDNA maxing out processor (2008) Pricing based on quantity (2000) PROTECT PAGES (2002) Share cost of training videos! (1998) Calculating multiple shipping... (1997) [REPLACE] inside [FOUNDITEMS] (1998)