I want the word "90%" to match my line "I have 90% of the shares in this company."
how can i write a regex for the same?
I tried something like this:
Pattern p = Pattern.compile("\\b90\\%\\b", Pattern.CASE_INSENSITIVE
| Pattern.MULTILINE);
Matcher m = p.matcher("I have 90% shares of this company");
while (m.find()){
System.out.println(m.group());
}
but no luck.
Can anyone catch fire on this fire?
Thanks a lot Archi
source
share