Saturday, January 19, 2013

regex capture $1 refers to no regex

I discovered this warning in my Apache log after adding a command via mod_include which utilized awk. When I placed backslashes before the dollar signs in my html page, the error disapeared.

To

awk '{print \$1\"/\"\$2\"/\"\$3}'

From

awk '{print $1\"/\"$2\"/\"$3}'

No comments: