I am trying to write a simple regex that matches all class names in a file. It should match them either with or without a space before the curly bracket.
E.g.
class myClass {...}
Returns ['myClass']
class myClass {....} class Foo{...}
Returns ['myClass', 'foo'].
And so on.
This is what I have so far but it doesnt seem to be working when there is no space befor ethe bracket:
([a-zA-Z_{1}][a-zA-Z0-9_]+)(?=\{)