I\'m trying to figure out how to match the following strings:
blaOSXbla os X bla bla os-x blablaOS_Xbla
A common pattern is pretty easy:
Try:
/os[ \-_]?x)/i.test(string)
Use ? to match the previous set zero or one time.
?
Demo