Skip to content

Commit 6894de5

Browse files
committed
Escape backslash for Windows
1 parent 8309314 commit 6894de5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/io/simplelocalize/cli/io/FileListReader.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ private String getGroupOrNull(String group, Matcher matcher)
6767
private Matcher getMatcher(String input, String pattern)
6868
{
6969
String replace = pattern
70+
.replace("\\", "\\\\") // escape backslash
7071
.replace(NAMESPACE_TEMPLATE_KEY, "(?<ns>.*)")
7172
.replace(LANGUAGE_TEMPLATE_KEY, "(?<lang>.*)");
7273
Pattern regex = Pattern.compile(replace);

0 commit comments

Comments
 (0)