help with replacetext

Jim Ault JimAultWins at yahoo.com
Sat Jun 30 12:21:31 EDT 2007


Try
[^\d\n]
of the hexedec version  [^\d\x0A]

which means replace all characters that are NOT digits or are NOT line feeds
(char 11, x0A)

[^\d\r]  does not work, since the line endings are
If you can't remember which to use, just use both

[^\d\n\r]  => should work for your case

Jim Ault
Las Vegas


On 6/30/07 5:43 AM, "Klaus Major" <klaus at major-k.de> wrote:

> Hi friends,
> 
> I am making tiny baby steps with regex stuff but need your help here :-)
> 
> I have a list of files like:
> 
> image one-01.png
> imag22.jpg
> i225.png
> image crop-22.jpg
> imag.tiff
> imageimage3 bb.jp
> ...
> 
> And need a list of JPG and PNG files and all numbers that are located
> right before the suffix.
> So from the above example it should return:
> 
> 01
> 22
> 22
> 225
> ...
> 
> You get the picture.
> 
> I already filtered all jpg and png files from the list, then I use
> e.g. :
> ...
> put replacetext(tolower(tFiles5),"[a-zA-Z]","") into tFiles6
> ...
> 
> but don't know how to add ALL non-numeric chars to the syntax.





More information about the use-livecode mailing list