Skip to content

Commit

Permalink
passing hbbtv test
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Green committed Apr 15, 2015
1 parent 73be54d commit a431239
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4326,6 +4326,10 @@ device_parsers:
device_replacement: '$1'
brand_replacement: '$2'
model_replacement: '$3'
- regex: '(HbbTV)/1\.1\.1.*CE-HTML/1\.\d;Vendor/(THOMSON);'
device_replacement: '$1'
brand_replacement: 'Thomson'
model_replacement: '$3'
- regex: '(HbbTV)(?:/1\.1\.1)?(?: ?\(;;;;;\))?; *CE-HTML(?:/1\.\d)?; *([^ ]+) ([^;]+);'
device_replacement: '$1'
brand_replacement: '$2'
Expand Down

2 comments on commit a431239

@russellwhitaker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrjgreen this can't actually work: line 4332 specifies 3rd capture group for replacement, but the regex in line 4329 specifies only 2 capture groups. Any JVM-based device parser which uses or wraps the standard Java regex libs - I'm writing one now in Clojure - attempting to use this section will fail with java.lang.IndexOutOfBoundsException: No group 3

@russellwhitaker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opened an issue on this: #51

Please sign in to comment.