3 ms·
Which version of Java (JDK) are you using? Which implementation? If that's true, then I fear the answer for Java may vary. The O'Reilly book on Regular Express
by dwheeler 2y ago
Which version of Java (JDK) are you using? Which implementation?
If that's true, then I fear the answer for Java may vary. The O'Reilly book on Regular Expressions, and the JDK documentation for version 21, say clearly that $ permits an optional \n at the end. The Java 8 documentation is murky, and maybe Java 8 is different.