Код: Выделить всё
\ := \\
\\ := \\ (the backslash is already escaped)
\\\ := \\\\
\\\\ := \\\\ (the two backslashes are already escaped)
etc...
Код: Выделить всё
Pattern.compile("(?
Есть предложения?>
Подробнее здесь: [url]https://stackoverflow.com/questions/79145388/java-regex-best-way-to-escape-all-unescaped-backslashes-in-string[/url]
Мобильная версия