Skip to content

Commit 8f6f467

Browse files
committed
[FIX] regex adjusted
1 parent b3a4484 commit 8f6f467

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/net/seesharpsoft/intellij/plugins/csv/CsvHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.HashMap;
2929
import java.util.Map;
3030
import java.util.function.Function;
31+
import java.util.regex.Pattern;
3132

3233
public final class CsvHelper {
3334

@@ -189,7 +190,7 @@ public static String unquoteCsvValue(String content, CsvEditorSettings.EscapeCha
189190
if (result.length() > 1 && result.startsWith("\"") && result.endsWith("\"")) {
190191
result = result.substring(1, result.length() - 1);
191192
}
192-
result = result.replaceAll("(?:\")\"", "\"");
193+
result = result.replaceAll("(?:" + Pattern.quote(escapeCharacter.getCharacter()) + ")\"", "\"");
193194
return result;
194195
}
195196

0 commit comments

Comments
 (0)