File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1020,9 +1020,9 @@ def ilike(
1020
1020
why = "Different backends support different regular expression syntax."
1021
1021
)
1022
1022
def re_search (self , pattern : str | StringValue ) -> ir .BooleanValue :
1023
- """Return whether the values match `pattern`.
1023
+ """Return whether `self` contains the regex `pattern`.
1024
1024
1025
- Returns `True` if the regex matches a string and `False` otherwise.
1025
+ Returns `True` if the regex matches any part of a string and `False` otherwise.
1026
1026
1027
1027
Parameters
1028
1028
----------
@@ -1038,7 +1038,7 @@ def re_search(self, pattern: str | StringValue) -> ir.BooleanValue:
1038
1038
--------
1039
1039
>>> import ibis
1040
1040
>>> ibis.options.interactive = True
1041
- >>> t = ibis.memtable({"s": ["Ibis project", "GitHub"]})
1041
+ >>> t = ibis.memtable({"s": ["Ibis project", "GitHub", "GitHub Actions" ]})
1042
1042
>>> t.s.re_search(".+Hub")
1043
1043
┏━━━━━━━━━━━━━━━━━━━━━━━━━┓
1044
1044
┃ RegexSearch(s, '.+Hub') ┃
@@ -1047,6 +1047,7 @@ def re_search(self, pattern: str | StringValue) -> ir.BooleanValue:
1047
1047
├─────────────────────────┤
1048
1048
│ False │
1049
1049
│ True │
1050
+ │ True │
1050
1051
└─────────────────────────┘
1051
1052
"""
1052
1053
return ops .RegexSearch (self , pattern ).to_expr ()
You can’t perform that action at this time.
0 commit comments