views:

68

answers:

1

I am trying to get the regex string from a table, but as soon as I put it into preg_match it throws an error about an unexpected "\". If I use the exact same string directly there is no issue.

+1  A: 

Just in case you haven't solved this yet ;)

In the comment you posted as comment to the other answer, you have an occurence of the following string: \\/\. I suppose that the first backslash escapes the second one, although it should probably escape the slash, as that is the regex delimiter. As it is not, it is taken as delimiter (which should already throw an error because of the position) and the following backslash is taken as modifier - which is unknown.

Franz
I tried "\/\" which returned "Unknown modifier ']'"
woody993
Could you please post the regex in question?
Franz