[REGEX]Matching strings

Associate
Joined
21 May 2003
Posts
1,365
Right, I'm clueless with regular expressions so I was wondering if someone could give me a hand.

I basically need to match the string

class/helper/<anthing here except mysql>

i.e.
class/helper/transactionhelper.class.php
class/helper/userhelper.class.php
but not
class/helper/mysql/producthelper.class.php
etc

No doubt this is extremely easy for one of you guys. Thanks in advance.
 
Just as an extra note, this is for a "text in file" search in eclipse (project with 1200+ php files), not for use in a script (makes no difference to the regex but maybe there's a better way?).

I've tried using

class/helper !class/helper/mysql

and various combinations thereof, none of which seem to work with the standard search, which is why I was trying to do it using regex.
 
Just to be clear, these strings could appear anywhere in the file, usually inside a string literal.

i.e.
Code:
require_once(CLASS_PATH."class/helper/userhelper.class.php");

to become 

require_once(CLASS_PATH."class/helper/mysql/userhelper.class.php");

The reason I'm searching for them is because I have to modify the directory structure to include support for multiple RDBs and I think I missed a few the first time round when I did the search-replace.
 
Back
Top Bottom