Simple wildcard searches for pattern matching

For a search test I was working on, I needed to verify what was returned for the name of a warehouse location. Normally the .contains command would be used, but for this test, I needed to check for multiple criteria. I need to check the warehouse is assigned to a certain coast and contains certain city values. The warehouse could be East or West with several city names listed afterward in any given order. For example, the warehouse location could look like: String branchName="Warehouse East #585 Palm Beach, FL Charlottesville, VA Nampa, ID Charlottesville, VA" String branchName="Warehouse West Los Angeles, CA, San Francisco, CA, San Diego, CA" I want to verify "Warehouse East" is part of the text and I want to verify "Palm Beach" is in the text. Since these two strings are not next to each other and the city could appear anywhere on the line the .contains will not work in this instance. However, the .matches command […]