I am currently looking to use regex for a find/replace operation within my text editor, SublimeText 3.
What I have are a lot of lines that look like this:
array(self::var1, self::var2, class::var_1, class::var_2, self::varCaps)
what I would like to do is match each item in the array. The only thing I know for sure is that each one has the ::
characters in the middle.
I can match the string before the ::
characters pretty easily using
(?<=::)[a-zA-z0-9\_\-]+
//should match 'self::' in self::var1
I can also match after the ::
characters using
[a-zA-z0-9\_\-]+(?=::)
//should match 'var1' in self::var1
How would I combine these two things to create an expression which matches the entire thing?
EDIT: My text editor is SublimeText 3