[tpm] New Regex question

Uri Guttman uri at stemsystems.com
Sat Oct 27 16:22:04 PDT 2012


On 10/27/2012 06:57 PM, Rob Janes wrote:
> $1 doesn't work.
>
> \1 is the characters matched while $1 is the pattern matched.
>
> It only matters if u want to match pure string.

that is wrong. both are only references to a grab which is always a 
string. you can use \1 in the regex to match what you have previously 
matched and grabbed. $1 is used in the replacement or after the regex to 
get what was grabbed. neither contains a regex.

uri



More information about the toronto-pm mailing list