Page 1 of 1

RegExReplace simple question

Posted: 25 Oct 2016, 05:41
by euras
Hi,

Simple question but I forgot how to do it :))
how to copy value without the last 3 symbols?
let's say it should be "1.532.245" in the last result :)

Code: Select all

one := "1.532.245,33"
two := RegExReplace(one, ???)
msgbox, %two%
return

Re: RegExReplace simple question

Posted: 25 Oct 2016, 05:47
by ahcahc
The needle to remove last 3 character ...$ using regexreplace.

Re: RegExReplace simple question

Posted: 25 Oct 2016, 07:28
by drawback
or {<x>}$ where <x> is an integer -> in your case {3}$
or if you want to ignore the comma and anything behind it e.g.:

Code: Select all

one := "1.532.245,33"
RegExMatch(one, "^[0-9.]+", two)
msgbox, % two