Tuesday, July 19, 2011

${node##+(:alnum:?)} explanation

${...} parameter expansion
${parameter##pattern} If pattern matches the beginning of the value of parameter name, the matched text is deleted from the result of sub- stitution. A single # results in the shortest match, two # results in the longest match.
+(pattern) matches any string of characters that matches one or more occurances of the specified pattern.
:alnum: same as [a-zA-Z0-9]