\L$1\E causes Bad pattern illegal/unsupported escape sequence error

已回答

Using IntelliJ IDEA 2018.2.1 (Ultimate Edition)
Build #IU-182.3911.36, built on August 6, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6

Inside my PHP project, I am attempting to do a global search/replace using the following regex expressions. The goal is to convert all instances of uppercase HTML tags to lowercase.

Search pattern: (<[A-Z]+)

Replace pattern: \L$1\E

Searching for <([A-Z]+) works as expected. However, when I attempt to do the replace, \L$1\E is reported as: Bad pattern illegal/unsupported escape sequence error.

According to https://www.jetbrains.com/help/idea/regular-expression-syntax-reference.html, my replace pattern above appears to be valid.

What replace pattern should I use to do the conversion I detail above?

0

请先登录再写评论。