You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by GitBox <gi...@apache.org> on 2022/03/02 14:50:00 UTC

[GitHub] [jmeter] vlsi commented on a change in pull request #700: Replace oro

vlsi commented on a change in pull request #700:
URL: https://github.com/apache/jmeter/pull/700#discussion_r817765611



##########
File path: src/core/src/main/java/org/apache/jmeter/save/CSVSaveService.java
##########
@@ -557,6 +549,46 @@ public static SampleSaveConfiguration getSampleSaveConfiguration(
         return saveConfig;
     }
 
+    private static String extractDelimiter(String headerLine) {
+        if (useJavaRegex) {
+            return extractDelimWithJavaRegex(headerLine);
+        }
+        return extractDelimWithOroRegex(headerLine);
+    }
+
+    private static String extractDelimWithJavaRegex(String headerLine) {
+        java.util.regex.Pattern pattern = java.util.regex.Pattern
+                // This assumes the header names are all single words with no spaces
+                // word followed by 0 or more repeats of (non-word char + word)
+                // where the non-word char (\2) is the same
+                // e.g. abc|def|ghi but not abd|def~ghi
+                .compile("\\w+((\\W)\\w+)?(\\2\\w+)*(\\2\"\\w+\")*" // $NON-NLS-1$

Review comment:
       Could you please cache it as well?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org