Strip characters from a single directory name
Posted: Mon Dec 17, 2007 3:39 pm
I'm currently using this:
After glancing over CC's regex tutorial for a refresher course I have re-written it as this:
Is the bottom more accurate to what I expect?
Basically remove ANY character that is not A-Z0-9_ from the *entire* string???
Code: Select all
$layout = preg_replace('[^0-9A-Za-z]', '', $layout);Code: Select all
$layout = preg_replace('/^[\w]$/', '', $layout);Basically remove ANY character that is not A-Z0-9_ from the *entire* string???