Regex implementation in any text files (using PHP)
Posted: Fri Jun 03, 2016 9:11 am
hi friends, I am trying to do a code by which to execute a command "regex" in php who seek and modify any text files
What does this code: select files, then I made a prag_match function to insert any Regex sintax. But if you verify the entire script in localhost, I got an error, something is not right.
here my entire code http://codepad.org/aCwOfRRD
The regex in preg_match I don't know why not work. I quote from the link above, the next piece of code that I think is wrong:
What does this code: select files, then I made a prag_match function to insert any Regex sintax. But if you verify the entire script in localhost, I got an error, something is not right.
here my entire code http://codepad.org/aCwOfRRD
The regex in preg_match I don't know why not work. I quote from the link above, the next piece of code that I think is wrong:
But first please run in localhost the entire code from the link above to see the error.$file_list = get_list_dir($path_file, false, 'file', true, $excluded_file);
preg_match('/(\d+)/', $file_list, $matches);
print_r($matches);