javascriptregexaptanareplace

Regex match second dot in number


I'm trying to match the second dot in a number to replace it later with a white space in my 'find and replace' function in Aptana.

I tried a lot of expressions, none of them worked for me.

For example I take the number:

48.454.714 (I want to replace the dot between 454 and 714)


Solution

  • Try this regex:

    (\d{3})\.(\d{3})
    

    and replace the first and second capturing group \1 \2

    as mentioned by FiveO, you might want to match other numbers of digits too. E.g. one to 3 digits: \d{1,3} or any number of digits: \d+