Insert and delete Commas

Robert Presender rpresender at earthlink.net
Sun Sep 29 00:26:01 EDT 2002


Ken, please excuse my delay in thanking you for your input.

  Reading the applicable docs has not enabled me figure out how to 
implement Regular Expressions.  It will be appreciated if you would 
give an example of  how to implement
([-]?) etc. I assume a script is required.  If so, what would the 
script be and where would it be located?  TIA

Regards ... Bob

On Wednesday, September 18, 2002, at 02:55  PM, Ken Ray wrote:
snip
> And to explain the regEx (which is something I do every time I make a 
> regex
> post), here's how it breaks up:
>
> ([-]?)
>     Look for 0 or 1 occurrence ("?") of a hyphen ("[-]"), and return it
> ("()") into the first variable provided (tMinusHold).
>
> ([0-9]*)
>     Then look for 0 or more occurrences ("*") of a number ("[0-9]"), 
> and
> return it ("()") into the second variable provided (tMainNum).
>
> [\.]?
>     Then look for 0 or 1 occurence ("?") of a decimal point ("\." - 
> the "\"
> escapes this 'special' character so it's not misinterpreted). Since 
> there's
> no parentheses, don't return anything, just use it as a delimiter.
>
> ([0-9]*)
>     Finally, look for 0 or more occurrences ("*") of a number 
> ("[0-9]"), and
> return it ("()") into the last variable provided (tDecimalHold).




More information about the Use-livecode mailing list