REGEX operator only matches characters at the beginning of a string
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
Research direction
Open flag_engine/segments/evaluator.py at the linked REGEX implementation and read Python’s Pattern.match and Pattern.search documentation. Reproduce the reported hello-world/world case and verify that the REGEX operator matches the substring as requested while preserving expected beginning-of-string behavior.
Written by the indexing model from the issue text.
Description
REGEX is implemented using Pattern.match, which only checks the beginning of the search string:
If zero or more characters at the beginning of string match this regular expression, return a corresponding Match
This means a regular expression like world will not match a trait value of hello-world.
We should be using Pattern.search instead: https://docs.python.org/3.11/library/re.html#re.Pattern.search
- Dominant language
- Python
- Stars
- 10
- Forks
- 5
- Avg merge
- 4d 8m
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Flagsmith/flagsmith-engine
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Flagsmith/flagsmith-engine#340 ·
-
Flagsmith/flagsmith-engine#341 · 1 comment · 1 assignee ·
-
Dependency Dashboard Open
Difficulty 1/5 Under an hour Newbie friendliness 25/100
Flagsmith/flagsmith-engine#306 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Flagsmith/flagsmith-engine#231 ·
-
bug
Flagsmith/flagsmith-engine#196 · 1 comment · 1 assignee ·
All issues in Flagsmith/flagsmith-engine
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100