Skip to content

[Bug]: Combinatorial inclusions don't render the correct regexp #1547

Open
@broguinn

Description

@broguinn

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions