question about find and replace
m.schonewille at economy-x-talk.com
Tue Sep 30 03:03:25 CDT 2008
Here's a possibility. Perhaps someone can come up with a shorter
constant dot = "."
set the numberformat to "000"
set the itemDel to dot
repeat for each line myLine in myData
put dot & item 2 of myLine * 1 & dot & cr after myNewData
return char 1 to -2 of myNewData
I believe regex is great to find data, but you can't use it to find
and edit all instances of a search pattern, if all new values have to
Economy-x-Talk Consulting and Software Engineering
Dutch forum: http://runrev.info/rrforum/
Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html
for more info.
On 30 sep 2008, at 09:54, Peter Alcibiades wrote:
> How do you pad out a series of numbers with leading zeros? Like for
> the series is
> and you want them to be
> I know how to find them, using the fact that they appear as shown
> two . characters, but then I don't know how to use regular
> expressions to
> put part of what has been found back along with the padding zeros.
> Or should
> you not be trying to use regex at all? I seem to recall something
> about look
> ahead and greediness but never really understood it, is this relevant?
More information about the use-livecode