Dreamweaver Regex Help
Hi i am trying to do a find and replace on files for this
<?php include $_SERVER["DOCUMENT_ROOT"]."/articles/[^a-z]/footer.php"; ?>
to
<?php include $_SERVER["DOCUMENT_ROOT"]."/includes/class/footer.php"; ?>
but for some reason it is not working! i have a clue that its the / messing it up?
Che开发者_开发问答ers
If you are using regex's, you will need to escape all the special chars...
<\?php include \$_SERVER\["DOCUMENT_ROOT"\]\."/articles/[^a-z]+/footer\.php"; \?>
to
<?php include \$_SERVER["DOCUMENT_ROOT"]."/includes/class/footer.php"; ?>
NOTE: I changed the a-z to match multiple characters. If you only want a single non a-z character, take out the +
You know that [^a-z] means search for anything but chars from a-z?
Try it with [a-z]+ instead. :)
精彩评论