Java Exceptions

Java Regex PatternSyntaxException

String inputString=”1.I am a code error resolvern”+”2.Here I am resolving a regex exceptionn”+”3.You need to keep in mind while using the regex or special characters in javan”+”4.Some of the special symbols are reserved”; String newString=inputString.replaceAll(“n”,”**”); String anotherNewString=newString.replaceAll(“**”,”n”); will throw an Exception as ** is reserved in Java. The exception thrown will be : Exception in …

Java Regex PatternSyntaxException Read More »