mirror of
https://github.com/mikefarah/yq.git
synced 2026-07-10 16:55:40 +00:00
Add link to string operator docs in select article
This commit is contained in:
parent
8693e3661b
commit
df33254afc
@ -62,7 +62,7 @@ going
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Select elements from array with regular expression
|
## Select elements from array with regular expression
|
||||||
See more regular expression examples under the `string` operator docs.
|
See more regular expression examples under the [`string` operator docs](https://mikefarah.gitbook.io/yq/operators/string-operators).
|
||||||
|
|
||||||
Given a sample.yml file of:
|
Given a sample.yml file of:
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@ -57,7 +57,7 @@ var selectOperatorScenarios = []expressionScenario{
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
description: "Select elements from array with regular expression",
|
description: "Select elements from array with regular expression",
|
||||||
subdescription: "See more regular expression examples under the `string` operator docs.",
|
subdescription: "See more regular expression examples under the [`string` operator docs](https://mikefarah.gitbook.io/yq/operators/string-operators).",
|
||||||
document: `[this_0, not_this, nor_0_this, thisTo_4]`,
|
document: `[this_0, not_this, nor_0_this, thisTo_4]`,
|
||||||
expression: `.[] | select(test("[a-zA-Z]+_[0-9]$"))`,
|
expression: `.[] | select(test("[a-zA-Z]+_[0-9]$"))`,
|
||||||
expected: []string{
|
expected: []string{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user