Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit d0f0565

Browse files
committed
Fix bson_regex Yaml tag
1 parent 3ce798c commit d0f0565

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

generator/config/expression/regexFind.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ tests:
3636
returnObject:
3737
$regexFind:
3838
input: '$description'
39-
regex: !regex 'line'
39+
regex: !bson_regex 'line'
4040
-
4141
name: 'i Option'
4242
link: 'https://www.mongodb.com/docs/manual/reference/operator/aggregation/regexFind/#i-option'
@@ -47,7 +47,7 @@ tests:
4747
# Specify i as part of the Regex type
4848
$regexFind:
4949
input: '$description'
50-
regex: !regex ['line', 'i']
50+
regex: !bson_regex ['line', 'i']
5151
-
5252
$addFields:
5353
returnObject:
@@ -62,5 +62,5 @@ tests:
6262
# Mix Regex type with options field
6363
$regexFind:
6464
input: '$description'
65-
regex: !regex 'line'
65+
regex: !bson_regex 'line'
6666
options: 'i'

generator/config/expression/regexFindAll.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ tests:
3636
returnObject:
3737
$regexFindAll:
3838
input: '$description'
39-
regex: !regex 'line'
39+
regex: !bson_regex 'line'
4040
-
4141
name: 'i Option'
4242
link: 'https://www.mongodb.com/docs/manual/reference/operator/aggregation/regexFindAll/#i-option'
@@ -47,7 +47,7 @@ tests:
4747
# Specify i as part of the regex type
4848
$regexFindAll:
4949
input: '$description'
50-
regex: !regex ['line', 'i']
50+
regex: !bson_regex ['line', 'i']
5151
-
5252
$addFields:
5353
returnObject:
@@ -62,7 +62,7 @@ tests:
6262
# Mix Regex type with options field
6363
$regexFindAll:
6464
input: '$description'
65-
regex: !regex 'line'
65+
regex: !bson_regex 'line'
6666
options: 'i'
6767
-
6868
name: 'Use $regexFindAll to Parse Email from String'
@@ -73,7 +73,7 @@ tests:
7373
email:
7474
$regexFindAll:
7575
input: '$comment'
76-
regex: !regex ['[a-z0-9_.+-]+@[a-z0-9_.+-]+\.[a-z0-9_.+-]+', 'i']
76+
regex: !bson_regex ['[a-z0-9_.+-]+@[a-z0-9_.+-]+\.[a-z0-9_.+-]+', 'i']
7777
-
7878
$set:
7979
email: '$email.match'
@@ -86,7 +86,7 @@ tests:
8686
names:
8787
$regexFindAll:
8888
input: '$comment'
89-
regex: !regex ['([a-z0-9_.+-]+)@[a-z0-9_.+-]+\.[a-z0-9_.+-]+', 'i']
89+
regex: !bson_regex ['([a-z0-9_.+-]+)@[a-z0-9_.+-]+\.[a-z0-9_.+-]+', 'i']
9090
-
9191
$set:
9292
names:

generator/config/expression/regexMatch.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ tests:
3636
result:
3737
$regexMatch:
3838
input: '$description'
39-
regex: !regex 'line'
39+
regex: !bson_regex 'line'
4040
-
4141
name: 'i Option'
4242
link: 'https://www.mongodb.com/docs/manual/reference/operator/aggregation/regexMatch/#i-option'
@@ -47,7 +47,7 @@ tests:
4747
# Specify i as part of the Regex type
4848
$regexMatch:
4949
input: '$description'
50-
regex: !regex ['line', 'i']
50+
regex: !bson_regex ['line', 'i']
5151
-
5252
$addFields:
5353
result:
@@ -62,7 +62,7 @@ tests:
6262
# Mix Regex type with options field
6363
$regexMatch:
6464
input: '$description'
65-
regex: !regex 'line'
65+
regex: !bson_regex 'line'
6666
options: 'i'
6767
-
6868
name: 'Use $regexMatch to Check Email Address'
@@ -75,6 +75,6 @@ tests:
7575
if:
7676
$regexMatch:
7777
input: '$comment'
78-
regex: !regex ['[a-z0-9_.+-][email protected]', 'i']
78+
regex: !bson_regex ['[a-z0-9_.+-][email protected]', 'i']
7979
then: 'Employee'
8080
else: 'External'

generator/config/expression/split.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ tests:
3636
path: '$city_state'
3737
-
3838
$match:
39-
city_state: !regex '[A-Z]{2}'
39+
city_state: !bson_regex '[A-Z]{2}'
4040
-
4141
$group:
4242
_id:

0 commit comments

Comments
 (0)