Simple question. If I need to check if a Regexp contains a simple pattern, in my case it would be ^0039, if I write something like this:
if(Pattern.matches("^(0039|\\+39)", "00392121")) System.out.println("Yes");
else System.out.println("No");
I have obviously No as answer because the pattern is missing the 2121. Do I need to transform the pattern in ^(0039|\\+39).* or is there a method more suitable for this?
I'm asking because I'm writing a method for our ETL engine and I'm not sure that everyone who's gonna use this is aware on how regexp works...so I'm foreseeing a lot of email of complaing with an obvious answer: "append .* to your regexp"*