henrylearn2rock / BrowscapCFC

Detect browser capabilities from user agent string from CGI using `browscap.ini`
9 stars 6 forks source link

Nested repetitions *?+ in expression #1

Closed JamoCA closed 10 years ago

JamoCA commented 10 years ago

Using ColdFusion 9 or 10, the CFC regex doesn't work with browscap.ini file (v5029, 5/8/2014) available at http://browscap.org/.

I get the following error:

Malformed regular expression "^Mozilla/5\.0 \(compatible;.*Baiduspider/2\.0;.*+http://www\.baidu\.com/search/spider\.html\)$".

Reason: Nested repetitions *?+ in expression.

The error occurred in compatible;.*Baiduspider/2\.0;.*+http: Line -1 Called from C:\CFusion\cfusion\CustomTags\Browscap.cfc: line 111
henrylearn2rock commented 10 years ago

ee7d4682430bc247afe0729ee3ac54b7e835ebb7 fixes #1