tags:

views:

34

answers:

2

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?

Cheers

+1  A: 

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 +

rikh
i tryed this example with reg enabled and it failes to find anything, hmmm
jhonnnnnnnny
A: 

You know that [^a-z] means search for anything but chars from a-z?

Try it with [a-z]+ instead. :)

Pesse