I have a regular expression with a pound # modifier.
What does \# mean in a regular expression? What does the # mean in a regular expression? Is it possible that Java is just ignoring these invalid modifiers?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
\#is not a valid regex modifier. It would technically be a way to escape a#character, IF the#meant anything significant in Java’s regex. Because it doesn’t, Java is just ignoring this invalidity and reading it as a#instead of throwing you an error.