Community
    • Login

    Replace with - question for advance formating

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 235 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Dafidov_Poland
      last edited by

      Hi.
      Have an issue - need to do bulk update on all open files which is easy but the problem is that I have date time expression dot separated and need for date to separate it with slash so it looks like this:
      “Value”: “19.01.2022 21:48:18”

      I would like to replace it with I think regular expression so it would look like that after transformation:
      “Value”: “19/01/2022 21:48:18”

      Wanted to use regular option to replace with shortcut of ctrl+h

      Don’t know if this is possible and what to put as Replace with to get the expected result.
      Any one any idea how to sort it out> If not with that option maybe with command line etc.

      I’m on windows without option to use any other system like linux.

      Would be grateful if anyone would be able to help.
      Thank you in advance!

      CoisesC 1 Reply Last reply Reply Quote 1
      • CoisesC
        Coises @Dafidov_Poland
        last edited by

        @Dafidov_Poland said in Replace with - question for advance formating:

        “Value”: “19.01.2022 21:48:18”

        I would like to replace it with I think regular expression so it would look like that after transformation:
        “Value”: “19/01/2022 21:48:18”

        The basic idea is to use capture groups — each group parenthesized in the find expression corresponds to a numbered group, $n, in the replacement:

        Find what : (\d\d)\.(\d\d)\.(\d\d\d\d)
        Replace with : $1/$2/$3

        If all dates, and only dates,consist of two digits, a period, two digits, a period, and four digits, that’s all you need.

        D 1 Reply Last reply Reply Quote 4
        • D
          Dafidov_Poland @Coises
          last edited by

          @Coises Thank you - it did the work perfectly!

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors