microsoft / microsoft/Power-Fx

MatchOptions.IgnoreCase has a huge impact on Regular Expression Match functions

Open
#2,258 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Regular Expressions
Dominant language
C#
Stars
3.4k
Forks
358
Avg merge
10h 34m
Merged PRs (30d)
3

Description

Microsoft Power Fx Console Formula REPL, Version 1.99.0.0
Enter Excel formulas.  Use "Help()" for details, "Option()" for options.

>> IsMatch( "3", Match.Digit, MatchOptions.IgnoreCase )
false

>> Match( "3", Match.Digit, MatchOptions.IgnoreCase )
false

>> MatchAll( "3", Match.Digit, MatchOptions.IgnoreCase )
false

>> MatchAll( "3", Match.Digit )

  FullMatch   StartMatch   SubMatches
 =========== ============ ============
  3           1            <table>

>> Match( "3", Match.Digit )
{FullMatch:"3", StartMatch:1, SubMatches:
<empty table>}

>> IsMatch( "3", Match.Digit )
true

It shouldn't do that (always return false)... And that's not what it does in Canvas.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the three expressions in the Microsoft Power Fx Console Formula REPL, comparing MatchOptions.IgnoreCase with the same calls without it. Check the implementation and tests for IsMatch, Match, and MatchAll, then verify that applying IgnoreCase does not make the digit pattern return false and that the behavior matches Canvas.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.