Replace different values with one value

  • I have done a quick google search but I am still struggling to find what I am looking for.

    I am editing the XML file for a game(this is freemode so it is just for fun) where the driving skills of the characters are displayed as below.


    How can I search and replace so that, in one movement, they all change to the below?


    I will add that they are not together as above, but spread throughout the XML document.

    Many thanks in advance.

  • Hello, @Covertraptor90,

    Very easy, Indeed !

    • Move to the very beginning of your file ( Ctrl + Origin )

    • Open the Replace dialog ( Ctrl + H )

    • Paste or type the following regex search <drivingSkill>\d\.\d+</drivingSkill>, in the Find what: zone

    • Paste or type the following replacement text <drivingSkill>1</drivingSkill>, in the Replace with: zone

    • Select the Regular expression search mode

    • Click on the Replace All button

    Et voilà !

    Notes :

    • The syntax \d matches any single digit, from 0 to 9

    • The escaped dot \. stands for the decimal dot character. It must be escaped because dot is, normally, a special regex character !

    • The syntax \d+, identical to \d{1,}, matches any non empty range of consecutive digits

    • Everything else is just text, which matches itself, in, both, search and replacement !

    Best Regards,


Log in to reply