Menu

#27 Lookaheads / lookbehinds are counted as groups

v1.0 (example)
open
nobody
None
5
2018-08-07
2018-08-07
Eyal Roth
No

Lookaheads / lookbehinds are counted as groups, which is incorrect and incompattible with standard java library.

java.util.regex.Pattern.compile("(?!xyz)").matcher("").groupCount() // 0

new jregex.Pattern("(?!xyz)").matcher("").groupCount() // 1 - WRONG!

This is actually preventing me from using the library entirely :(

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.