Skip to content
Snippets Groups Projects
Commit bfa89573 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

represent empty capture names as ""

parent e646be78
Branches
No related tags found
No related merge requests found
......@@ -796,6 +796,11 @@ public class GrepFunctions {
int captureCount = RFFIFactory.getRFFI().getPCRERFFI().exec(pcre.result, 0, text, offset, 0, ovector);
if (captureCount >= 0) {
String[] captureNames = RFFIFactory.getRFFI().getPCRERFFI().getCaptureNames(pcre.result, 0, maxCaptureCount);
for (int i = 0; i < captureNames.length; i++) {
if (captureNames[i] == null) {
captureNames[i] = "";
}
}
assert captureCount - 1 == captureNames.length;
int[] captureStart = null;
int[] captureLength = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment