My code currently looks like this (also available here[1]):
ModificationFactory modFactory = new ModificationFactory(minimumLengthOfLookBehind, newNumberOfChars);
this.factory = new LineColumnAwareModificationFactory(modFactory);
this.matchProcessor = matchProcessor;
this.matcher = matcher;
this.newNumberOfChars = newNumberOfChars;
My issue is that factory.getLineNumber() and factory.getCurrentColumn() do not appear to be a usable way to find the current position of the match within the stream.
As you can see, I had a rather "creative" set of workarounds for this, but they only appear to work in a narrow set of circumstances. :)
Is what I am trying to do feasible? Do you have any guidance on accomplishing this task?
Thanks,
Jess
[1]
https://github.com/windup/windup/blob/master/rules-base/api/src/main/java/org/jboss/windup/rules/files/condition/regex/StreamRegexMatcher.java