I want to compare two string using regex in javascript.
Following is the requiremet -
String1 = 'xyz.east.abc.com'
String2 = 'xyz.*.abc.com'
String3 = 'pqr.west.efg.com'
String4 = 'pqr.*.efg.com'
I want a regular expression by using which I should be able to compare above strings and the output should be String1 & String2 are same and String3 & String4 are same.
I have tried using different combination but I was not able to figure out the correct regex to perform the task.