notepad++ reg expressions to swap two values

前端 未结 4 1900
你的背包
你的背包 2020-12-18 10:02

i\'m trying to swap latitude and longitude values in notepad++ with regular expressions. i tried to search some guide on the web but i didn\'t understand how to do. i have a

4条回答
  •  太阳男子
    2020-12-18 10:54

    Search for:

    ([0-9]+(\.[0-9]+)?),([0-9]+(\.[0-9]+)?)
    

    Replace with:

    \2,\1
    

    This catches numbers like 1, 1.1 but not 1. or .5. My previous regexp ([0-9]+.?[0-9]*),([0-9]+.?[0-9]*) would allow for 1..

提交回复
热议问题