Categories
Allgemein

Jetbrains search&replace with regex backreferences

Note for me: Documentation.

Search:

\"date" => "(.*)\.(.*)\.(.*)"

Replace:

\"date" => "20$3-$2-$1"

The example replaces an old-fashioned German date string (24.02.2014) into ISO format (2014-02-24).

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.