I have the following Java String which I need to compare with the regex but these string can consist of the optional values which may be present or not present I need to perform