I really need to use EREG or something that is also compatible with MySql. I would like to have the same search done in PHP and MySQL.
$test="
<NEXT>STORE_AS:::COMPANY\n
<NEXT>STORE_AS_DATA:::ACME INC\n
<NEXT>COMPANY_NAME:::ACME INC\n
<NEXT>COMPANY_DEPT:::SEVICE\n
<NEXT>NAME_LAST:::USER\n
<NEXT>NAME_FIRST:::TEST\n
<NEXT>NAME_INIT:::W\n
";
Let's say we had above statement with no tabs actually in data.
I would like to only search on a specific parts on the entire variable.
So, I would like to search on anything that is between ::: and \n thorughout the variable on each line..
So if I wanted to find service I would type 'S' in a search string and S I would find. Or Search for 'VICE' or 'ST' for TEST.
But if a user wanted to search for 'EX' the ereg should not report back true because I do not want <NEXT><DATA>::: to be searched.
Statements I have tried were like this
Example Query For "ST"
ereg("<NEXT>.:::.ST.*\n")
This does not work, but maybe you can get an idea of my problem. Their maybe white space before the \n also. So the search would probably need something like that as well.