Steven
Steven

Reputation: 13995

PHP regex doesn't match?

I have the following RegEx

@version:\'(?:CKEditor )?([\d\.]+)(?:.+revision:\'([\d]+))?@

And it should match

version:"4.0 Beta"

and return 4.0 Beta

But it doesn't seem to be working? Am I missing something?

Upvotes: 0

Views: 53

Answers (1)

El Yobo
El Yobo

Reputation: 14966

Your regex matches a single quote, not a double quote. Try the following instead.

@version:\"(?:CKEditor )?([\d\.]+)(?:.+revision:\"([\d]+))?@

Upvotes: 2

Related Questions