I am writing a Java program to read other Java source files and pull out there import statements:
package com.me.myapp
import blah.example.dog.client.Fizz;
import blah.example.cat.whiskers.client.Buzz;
import blah.example.shared.Foo;
import blah.example.server.Bar;
...etc.
I want the regex to return anything starting with import blah.example. and that has client in the package name after that. Hence the regex would pick up Fizz and Buzz in the example above, but not Foo or Bar.
My best attempt is:
String regex = "import blah.example*client*";
if(someString.matches(regex))
// Do something
This regex isn't throwing an exception, but itsn't working. Where am I going wrong with it? Thanks in advance!