You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The method signature is currently RegexMatchSpan(rgx: str, ignore_case: bool, search: bool=False, full_match: bool=True, longest_match_only: bool).
search=False is equivalent to wrap the provided rgx with ^(<rgx>) to match at the beginning of a span.
On the other hand, full_match=True wraps the provided rgx with (<rgx>)$ to match at the end of a span.
The problem is that full_match=True fully matches only when search=False, which means the behavior of full_match depends on search.
Describe the solution you'd like
Remove search and full_match args, and add a new arg like mode that takes "search", "match", or "fullmatch" (named after re.search, re.match, re.fullmatch).
Describe alternatives you've considered
Just remove search and full_match args and give the user the full control over regex.
In this case, the ignore_case can also be removed.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The method signature is currently
RegexMatchSpan(rgx: str, ignore_case: bool, search: bool=False, full_match: bool=True, longest_match_only: bool)
.search=False
is equivalent to wrap the providedrgx
with^(<rgx>)
to match at the beginning of a span.On the other hand,
full_match=True
wraps the providedrgx
with(<rgx>)$
to match at the end of a span.The problem is that
full_match=True
fully matches only whensearch=False
, which means the behavior offull_match
depends onsearch
.Describe the solution you'd like
Remove
search
andfull_match
args, and add a new arg likemode
that takes "search", "match", or "fullmatch" (named afterre.search
,re.match
,re.fullmatch
).Describe alternatives you've considered
Just remove
search
andfull_match
args and give the user the full control over regex.In this case, the
ignore_case
can also be removed.Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: