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:

WC2.0 Memory Requirements (1997) Help! WebCat2 bug (1997) Download URL & access on the fly ? (1997) [WebDNA] WebDNA future (2010) [OT] Site test... (2003) carriage returns in data (1997) Limiting user access to .tmpl files (1997) Add to cart issue (2007) [LOOKUP] (1997) Separate SSL Server (1997) Adding up line items. (2000) Searching multiple fields (1997) cookies (2002) Email Problem (1997) Wrapping text (1998) MacAutorize and T1 (1998) Problems getting parameters passed into email. (1997) Subtotal help (1997) input and accents (2000) wc 2 pro users - sites, quotes wanted (1997)