but if I do put on on it it says its an illegal escape character?
C:\slop>java test
parenthesis ( inside ) a string
C:\slop>
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Originally posted by J Dunn:
When I do "(" it generates errors, since it thinks it is closing something outside. "\(" generates illegal escape character.
Compiling using javac in Linux if it matters.
Originally posted by Piet Verdriet:
Which indeed will throw an exception since the regex sngine expects a closing parentheses.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
Which, on the other hand, has nothing to do with the compiler at all.
Originally posted by Henry Wong:
The OP never mentioned regular expressions. And clearly stated that when "(" is used (without escapes), it generates errors, since it thinks it is closing something outside of the string.
So... it may be best to let the OP clarify a bit, and show us some code.
Henry
Yeah, but is it art? What do you think tiny ad?
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
|