user9183879
user9183879

Reputation:

How to replace and word after : when you getting unrecognized escape sequence?

I would like to replace any word after Time:.

The expression is

\Time:.*$

I get the error from the title.

I tried With double / before and doesn't find anything.

Upvotes: 1

Views: 59

Answers (1)

Wiktor Stribiżew
Wiktor Stribiżew

Reputation: 627607

\T is an invalid regex escape sequence, it is not defined in the Boost regex library (NPP uses Boost regex library).

You may use

Find: (Time:\s*)\w+
Replace: $1

Detials

  • (Time:\s*) - Capturing group 1: Time: and 0+ whitespaces
  • \w+ - 1+ word chars.

The $1 refers to the capturing group contents, so Time: and whitespaces are not removed.

Upvotes: 1

Related Questions