pattern matching for string in java pattern matching in java exle string