Relative Content

Tag Archive for rregexstringmatch

regex: Can’t catch first occurence of character group

I have column names like this: var1, var2, var3, …. var99. but sometimes there are wrong entries between var and the number, something like var dfdsf 22. I want to extract only the relevant part, which is “var” and the number at the end. What I do is:

regex: Can’t catch first occurence of character class

I have column names like this: var1, var2, var3, …. var99. but sometimes there are wrong entries between var and the number, something like var dfdsf 22. I want to extract only the relevant part, which is “var” and the number at the end. What I do is: