次のような文字列があり、最初の 2 つの出現のみをwith2005:10:29 12:23:53
に置き換えたい:
-
期待される結果2005-10-29 12:23:53
編集:
元の魔女krename
を編集/フォーマットすることはできませんが、不要なフォーマットを返しますが、文字列を後処理する必要があります。[exifExif.Image.DateTime]
2005:10:29 12:23:53
Find and Replace
(?<=\d{4}):|:(?=\d{2}\s)
rubularで仕事をしますが、KDE ではしません :(
もっと多くの解決策があると確信しています。
編集:
:(?=\d{2}:\d{2}\s)|:(?=\d{2}\s)
KDE でも動く
読んだ後、この解決策を見つけました
You can use a full-fledged regular expression inside the lookahead.
Most regular expression engines only allow literal characters and
alternation inside lookbehind, since they cannot apply regular
expression backwards.
正規表現のチュートリアルで