I'm trying to write a regex to extract nodes ids and classes from css selectorText.
For example:
.linear *, .test-in *, .test-out *, .test *, .test-in-out.casanova#casanova * > #test22
I need a regex to extract only the classes and ids:
linear , test-in , test-out , test , test-in-out , casanova , casanova , test22
so I need a regex to match any string that starts with ./# and ends with space/./# the first occurrence for any of them.
I manage to create this:
(?:^|[\.]).*?([^\s]+(?!\.))
but as you can see it doesn't work properly.