Thanks, the undo and text prefpane tips really help.
The problem I'm having with slashes/backslashes is puzzling me. Basically I have a string formatted like "12/31/2012", and I'm trying to pull the month and year out of it for file naming, in applescript.
Here's my statement for pulling out the month:
set stmtMonth to do shell script "echo $x | awk -F'/' '{print $1}'"
where $x is "12/31/2012". In terminal on the command line, this seems to work fine and returns "12". But in this applescript, it returns an empty string. I've tried escaping the forward slash, once, twice and even four times. Unfortunately, "quoted form of" doesn't help with this, I think due to the shell variables that are used.
I know there are many ways to do this, but I'm stumped as to why this simple method isn't working. And I'm sure the answer is right in front of my face... I'm not new to shell programming, other kinds of scripts, regular expressions, but I am new to applescript (and hazel!).