0

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
  • Please post the string in question. Did you wrap the regex with delimiters? Commented Oct 12, 2009 at 17:14

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Could you please post the regex in question?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.