Why regular expressions are your friend. This is written in Stata but applies to any language where regular expressions exist.Original version if length("`qx'")==3 { /*ex: 5q0*/ ...

Why regular expressions are your friend. This is written in Stata but applies to any language where regular expressions exist.Original version if length("`qx'")==3 { /*ex: 5q0*/ ...

Let's say your hands are aching from too much typing in of variables. What to do? Get a keyboard tray and learn proper ergonomics, of course.But what if you just want to reduce the amount of typing in of variables you do for reasons of laziness...err...

A regular expression allows you to do a moderately fancy search (and replace if you want). So say you wanted to replace all the "Dennis"s in a variable with "Awesome"s, but only if they're at the end of the line. You could try:-replace PBFnamevar = r...