Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
gregli-msft committed Mar 9, 2025
1 parent 4644f91 commit 9ab43b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/libraries/Microsoft.PowerFx.Core/Texl/Builtins/Match.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ internal class MatchOptionString
public const string Complete = "^c$"; // invented by us, with the ^ and $ around
}

internal class MatchNewlines
{
public const string EscapeChars = @"\n\x0b\f\r\x85\u2028\u2029";
}

internal class BaseMatchFunction : BuiltinFunction
{
private readonly ConcurrentDictionary<string, Tuple<DType, bool, bool, bool>> _regexTypeCache;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ public Task<FormulaValue> InvokeAsync(FormulaValue[] args, CancellationToken can
bool multiline = options.Contains(MatchOptionChar.Multiline);
bool ignoreCase = options.Contains(MatchOptionChar.IgnoreCase);
bool dotAll = options.Contains(MatchOptionChar.DotAll);
bool matchStart = options.Contains(MatchOptionChar.BeginsWith);
bool matchEnd = options.Contains(MatchOptionChar.EndsWith);
bool matchStart = options.Contains(MatchOptionChar.Begins);
bool matchEnd = options.Contains(MatchOptionChar.Ends);
bool numberedSubMatches = options.Contains(MatchOptionChar.NumberedSubMatches);

// Can't add options ^ and $ too early as there may be freespacing comments, centralize the logic here and call subfunctions
Expand Down

0 comments on commit 9ab43b1

Please sign in to comment.