Skip to content

Inconsistent Matching Behavior Between (feature/**|feature*) and (feature*|feature/**) for feature/test/test #147

@folger-fan

Description

@folger-fan

Issue Description:

The regular expressions (feature/**|feature*) and (feature*|feature/**) yield inconsistent results when matching the string feature/test/test. Specifically:

  1. (feature/**|feature*) does not match feature/test/test.
  2. (feature*|feature/**) does match feature/test/test.

This behavior seems unexpected, as both expressions appear to be logically similar. Could you please clarify why this inconsistency occurs and provide guidance on the correct usage of these patterns?

Steps to Reproduce:

  1. Use the regular expression (feature/**|feature*) to match the string feature/test/test.
  2. Use the regular expression (feature*|feature/**) to match the same string.

Expected Result:
Both expressions should either match or not match the string consistently.

Actual Result:
The first expression does not match, while the second one does.

Additional Context:
This issue might be related to the order of patterns in the alternation (|) or the interpretation of the * and /** operators. Any insights or documentation on this behavior would be greatly appreciated.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions