[Bug]: Combinatorial inclusions don't render the correct regexp
Opened this issue · 2 comments
broguinn commented
Would you like to work on a fix?
- Check this if you would like to implement a PR, we are more than happy to help you go through the process.
Current and expected behavior
We want to support Chrome 41 (the last 32-bit release) and Chrome versions 109+. I've tried writing this as a browserslist rule a few ways:
Browserslist Rule | Produced Regexp |
---|---|
Chrome 41 or Chrome >= 109 and not Chrome 42-108 |
/Chrom(ium|e)\/(4[1-9]|[5-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))/ |
Chrome 41 or Chrome >= 109 |
/Chrom(ium|e)\/(4[1-9]|[5-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))/ |
Chrome >= 109 or Chrome 41 |
/Chrom(ium|e)\/(4[1-9]|[5-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))/ |
And none of these regexps work against test UserAgent strings, as I would expect. I don't think my syntax is off. Is this a bug? If so, I'm happy to help resolve it.
Reproduction
Try generating regexps from combinatory browser versions.
browserslist-useragent-regexp version
v4.1.1
Possible solution
No response
dangreen commented