Unrecognized escape sequence \K

Tool for Search and Replace across multiple files.
Post Reply
me_suzy
Posts: 16
Joined: Thu Jul 14, 2016 11:31 am

Unrecognized escape sequence \K

Post by me_suzy »

hello, I use many times some regex with \K

Look at this code (tested in notepad++ and sublime_text)

(?-s)(?:.*\R){3}\K.*(?s)(.*) (This will select everything after line 3). Of course, I can change \R with \r . But what about \K ?

Look at this print screen. https://snag.gy/ugTFIB.jpg
User avatar
DigitalVolcano
Site Admin
Posts: 1380
Joined: Thu Jun 09, 2011 10:04 am

Re: Unrecognized escape sequence \K

Post by DigitalVolcano »

\K isn't currently supported in .NET Regular expressions.

Check out the list of supported commands here:
https://msdn.microsoft.com/en-us/librar ... .110).aspx
me_suzy
Posts: 16
Joined: Thu Jul 14, 2016 11:31 am

Re: Unrecognized escape sequence \K

Post by me_suzy »

User avatar
DigitalVolcano
Site Admin
Posts: 1380
Joined: Thu Jun 09, 2011 10:04 am

Re: Unrecognized escape sequence \K

Post by DigitalVolcano »

\k (lowercase) is supported, but not \K (uppercase)
4EverMaAT
Posts: 11
Joined: Tue Sep 24, 2019 4:07 pm

Re: Unrecognized escape sequence \K

Post by 4EverMaAT »

DigitalVolcano wrote: Tue Dec 03, 2019 11:07 am \k (lowercase) is supported, but not \K (uppercase)
Is there a workaround to using uppercase \K ??
Post Reply