Categories Operation "Doppelganger" [Question] Can I use regex to select a css selector based on class? Post author By Mike Nova Post date December 5, 2022 We can use a regex pattern, in the page.locator method to select an element – as mentioned in the example here. I’m looking to see if I can use the same for a class based css locator ?