I'm programming in Java and I want to use regex to look for any data with a percent sign, e.g. 10%, 20%,30%,etc. I've tried
a.matches("%")but that only returns true if the string matches exactly the percent sign. What should be the correct regular expression to use? Thanks
closed as off topic by Brad Patton, Sathya♦ Apr 26 '13 at 2:46
Questions on Super User are expected to relate to computer software or computer hardware within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.
If you're just looking for a '%', then
Considering regular expressions, the