1
1
RegexLiteral
2
2
------------
3
+
4
+
5
+
6
+
3
7
### Synopsis
4
8
Regex Literal Transpiler
5
9
10
+
11
+
6
12
---
13
+
14
+
7
15
### Description
8
16
9
17
Allows for Regex Literals within PipeScript.
@@ -12,7 +20,11 @@ Regex Literals are strings enclosed within slashes.
12
20
13
21
The ending slash may be followed by ``` [Text.RegularExpressions.RegexOptions] ``` .
14
22
23
+
24
+
15
25
---
26
+
27
+
16
28
### Examples
17
29
#### EXAMPLE 1
18
30
``` PowerShell
@@ -82,48 +94,52 @@ $($Keywords -join '|') # followed by keywords
82
94
$($Keywords -join '|') # followed by keywords
83
95
[ \s\p{P}] {0,1} # followed by whitespace or punctuation
84
96
"@, 'IgnorePatternWhitespace,IgnoreCase')
97
+
98
+
85
99
---
100
+
101
+
86
102
### Parameters
87
103
#### ** StringConstantExpression**
88
104
89
105
A RegexLiteral can be any string constant expression (as long as it's not in an attribute).
90
106
91
107
92
108
93
- > ** Type** : ``` [StringConstantExpressionAst] ```
94
109
95
- > ** Required** : true
96
110
97
- > ** Position** : named
98
111
99
- > ** PipelineInput** : true (ByValue)
112
+ | Type | Required| Position| PipelineInput |
113
+ | -------------------------------| --------| --------| --------------|
114
+ | ` [StringConstantExpressionAst] ` | true | named | true (ByValue)|
100
115
101
116
102
117
103
- ---
104
118
#### ** ExpandableStringExpression**
105
119
106
120
It can also by any expandable string, which allows you to construct Regexes using PowerShell variables and subexpressions.
107
121
108
122
109
123
110
- > ** Type** : ``` [ExpandableStringExpressionAst] ```
111
124
112
- > ** Required** : true
113
125
114
- > ** Position** : named
115
126
116
- > ** PipelineInput** : true (ByValue)
127
+ | Type | Required| Position| PipelineInput |
128
+ | ---------------------------------| --------| --------| --------------|
129
+ | ` [ExpandableStringExpressionAst] ` | true | named | true (ByValue)|
130
+
131
+
117
132
118
133
119
134
120
135
---
136
+
137
+
121
138
### Syntax
122
139
``` PowerShell
123
140
RegexLiteral -StringConstantExpression <StringConstantExpressionAst> [<CommonParameters>]
124
141
```
125
142
``` PowerShell
126
143
RegexLiteral -ExpandableStringExpression <ExpandableStringExpressionAst> [<CommonParameters>]
127
144
```
128
- ---
129
145
0 commit comments