Skip to content

Commit 99e11b1

Browse files
Merge pull request #186 from StartAutomating/StartAutomating-Irregular-Funding
Create FUNDING.yml
2 parents b2c9874 + b789c8f commit 99e11b1

19 files changed

Lines changed: 364 additions & 246 deletions

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: [StartAutomating] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Once you understand some basics of that syntax, regular expressions become a lot
3232
3. A Regex can have comments! ( # Like this in .NET ( or like (?#this comment) in ECMAScript ) ).
3333
4. You don't have to do it all in one expression!
3434

35-
Irregular comes with 137 useful [named expressions](SavedPatterns.md), and lets you create more.
35+
Irregular comes with 138 useful [named expressions](SavedPatterns.md), and lets you create more.
3636

3737
To see the expressions that ship with Irregular, run:
3838

RegEx/PowerShell/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ They are designed to work in _most_ scenarios and to offer an alternative way to
99
|----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|------------------------------------------|
1010
|[?<PowerShell_Attribute>](Attribute.regex.txt) |Matches a PowerShell attribute declaration |
1111
|[?<PowerShell_AttributeValue>](AttributeValue.regex.txt) |This expression extracts the key/value pairs from a PowerShell attribute body (the content within parenthesis)|
12+
|[?<PowerShell_Function>](Function.regex.txt) |Matches PowerShell functions |
1213
|[?<PowerShell_HelpField>](HelpField.regex.ps1) |Matches specific fields from inline help<br/> |[generator](HelpField.regex.ps1) |
1314
|[?<PowerShell_Invoke_Variable>](Invoke_Variable.regex.txt)|Matches any time a variable is invoked (with the . or & operator) |[source](Invoke_Variable.regex.source.ps1)|
1415
|[?<PowerShell_ParameterSet>](ParameterSet.regex.txt) |Matches PowerShell ParameterSets (in [Parameter] and [CmdletBinding] attributes) |[source](ParameterSet.regex.source.ps1) |

SavedPatterns.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
### Irregular Patterns
2-
Irregular includes 137 regular expressions
2+
Irregular includes 138 regular expressions
33
|Name|Description|IsGenerator|
44
|:---|:----------|:----------|
55
|[ANSI_24BitColor](/RegEx/ANSI/24BitColor.regex.txt)|Matches an ANSI 24-bit color|False|
@@ -112,6 +112,7 @@ Irregular includes 137 regular expressions
112112
|[PII_Unredacted_SSN](/RegEx/PII/Unredacted_SSN.regex.txt)|Matches Unredacted Social Security Numbers|False|
113113
|[PowerShell_Attribute](/RegEx/PowerShell/Attribute.regex.txt)|Matches a PowerShell attribute declaration|False|
114114
|[PowerShell_AttributeValue](/RegEx/PowerShell/AttributeValue.regex.txt)|This expression extracts the key/value pairs from a PowerShell attribute body (the content within parenthesis)|False|
115+
|[PowerShell_Function](/RegEx/PowerShell/Function.regex.txt)|Matches PowerShell functions|False|
115116
|[PowerShell_HelpField](/RegEx/PowerShell/HelpField.regex.ps1)|Matches specific fields from inline help|True|
116117
|[PowerShell_Invoke_Variable](/RegEx/PowerShell/Invoke_Variable.regex.txt)|Matches any time a variable is invoked (with the . or & operator)|False|
117118
|[PowerShell_ParameterSet](/RegEx/PowerShell/ParameterSet.regex.txt)|Matches PowerShell ParameterSets (in [Parameter] and [CmdletBinding] attributes)|False|

docs/CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,4 +299,3 @@ Hat Tips: @JayKul, @LaurentDardenne
299299
* ?<HTML_DataAttribute>
300300
* ?<HTML_DataSet>
301301
* ?<HTML_ItemScope>
302-

docs/Export-RegEx.md

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
Export-RegEx
22
------------
3+
4+
5+
6+
37
### Synopsis
48
Exports a RegEx
59

10+
11+
612
---
13+
14+
715
### Description
816

917
Exports one or more Regular Expressions
1018

19+
20+
1121
---
22+
23+
1224
### Related Links
1325
* [Import-RegEx](Import-RegEx.md)
1426

@@ -18,7 +30,11 @@ Exports one or more Regular Expressions
1830

1931

2032

33+
34+
2135
---
36+
37+
2238
### Examples
2339
#### EXAMPLE 1
2440
```PowerShell
@@ -30,7 +46,11 @@ Export-RegEx -Name Digits, Decimals -Path $home\MyRegExs
3046
Export-RegEx -Name Digits, Decimals -As Script # Creates a script that embedes the expressions and Use-RegEx
3147
```
3248

49+
50+
3351
---
52+
53+
3454
### Parameters
3555
#### **Name**
3656

@@ -47,7 +67,6 @@ The name of the regular expression. If not provided, this can be inferred if th
4767

4868

4969

50-
---
5170
#### **Path**
5271

5372
The export path.
@@ -64,7 +83,6 @@ If this is not provided, it will export regular expressions to the user's Irregu
6483

6584

6685

67-
---
6886
#### **As**
6987

7088
How the expression will be exported.
@@ -96,7 +114,6 @@ Valid Values:
96114

97115

98116

99-
---
100117
#### **Noun**
101118

102119
If provided, will rename -RegEx commands with the provided -Noun.
@@ -114,27 +131,35 @@ It prevents name conflicts with Irregular.
114131

115132

116133

117-
---
118134
#### **WhatIf**
119135
-WhatIf is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```.
120136
-WhatIf is used to see what would happen, or return operations without executing them
121137
#### **Confirm**
122138
-Confirm is an automatic variable that is created when a command has ```[CmdletBinding(SupportsShouldProcess)]```.
123139
-Confirm is used to -Confirm each operation.
124-
140+
125141
If you pass ```-Confirm:$false``` you will not be prompted.
126-
127-
142+
143+
128144
If the command sets a ```[ConfirmImpact("Medium")]``` which is lower than ```$confirmImpactPreference```, you will not be prompted unless -Confirm is passed.
129145

146+
147+
130148
---
131-
### Syntax
132-
```PowerShell
133-
Export-RegEx [[-Name] <String[]>] [[-Path] <String>] [[-As] <String>] [[-Noun] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
134-
```
135-
---
149+
150+
136151
### Notes
137152
When exporting as a script, Use-RegEx is renamed to UseRegex.
138153
This enables embedding the core of Irregular and your Regular Expressions into a module while making it easy to avoid exporting Irregular.
139154

140155
To use this within a module, make sure your module explicitly exports commands, or exports with a wildcard like '*-*'.
156+
157+
158+
159+
---
160+
161+
162+
### Syntax
163+
```PowerShell
164+
Export-RegEx [[-Name] <String[]>] [[-Path] <String>] [[-As] <String>] [[-Noun] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]
165+
```

docs/Get-RegEx.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
Get-RegEx
22
---------
3+
4+
5+
6+
37
### Synopsis
48
Gets Regular Expressions
59

10+
11+
612
---
13+
14+
715
### Description
816

917
Gets saved Regular Expressions.
1018

19+
20+
1121
---
22+
23+
1224
### Related Links
1325
* [Use-RegEx](Use-RegEx.md)
1426

@@ -18,7 +30,11 @@ Gets saved Regular Expressions.
1830

1931

2032

33+
34+
2135
---
36+
37+
2238
### Examples
2339
#### EXAMPLE 1
2440
```PowerShell
@@ -44,7 +60,11 @@ Get-RegEx -Name NextWord
4460
}) -join [Environment]::NewLine
4561
```
4662

63+
64+
4765
---
66+
67+
4868
### Parameters
4969
#### **Name**
5070

@@ -61,7 +81,6 @@ The Name of the Regular Expression.
6181

6282

6383

64-
---
6584
#### **FilePath**
6685

6786
The path to one or more files or folders containing regular expressions.
@@ -72,13 +91,12 @@ Files should be named $Name.regex.txt
7291

7392

7493

75-
|Type |Required|Position|PipelineInput |
76-
|------------|--------|--------|---------------------|
77-
|`[String[]]`|false |2 |true (ByPropertyName)|
94+
|Type |Required|Position|PipelineInput |Aliases |
95+
|------------|--------|--------|---------------------|--------|
96+
|`[String[]]`|false |2 |true (ByPropertyName)|Fullname|
7897

7998

8099

81-
---
82100
#### **FromModule**
83101

84102
If provided, will get regular expressions from any number of already imported modules.
@@ -94,7 +112,6 @@ If provided, will get regular expressions from any number of already imported mo
94112

95113

96114

97-
---
98115
#### **As**
99116

100117
How the expression will be returned.
@@ -126,7 +143,6 @@ Valid Values:
126143

127144

128145

129-
---
130146
#### **Noun**
131147

132148
If provided, will rename -RegEx commands with the provided -Noun.
@@ -144,16 +160,23 @@ It prevents name conflicts with Irregular.
144160

145161

146162

163+
164+
147165
---
166+
167+
148168
### Outputs
149169
* [Management.Automation.PSObject](https://learn.microsoft.com/en-us/dotnet/api/System.Management.Automation.PSObject)
150170

151171

152172

153173

174+
175+
154176
---
177+
178+
155179
### Syntax
156180
```PowerShell
157181
Get-RegEx [[-Name] <String[]>] [[-FilePath] <String[]>] [[-FromModule] <String[]>] [[-As] <String>] [[-Noun] <String>] [<CommonParameters>]
158182
```
159-
---

docs/Import-RegEx.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
Import-RegEx
22
------------
3+
4+
5+
6+
37
### Synopsis
48
Imports Regular Expressions
59

10+
11+
612
---
13+
14+
715
### Description
816

917
Imports saved Regular Expressions.
1018

19+
20+
1121
---
22+
23+
1224
### Related Links
1325
* [Use-RegEx](Use-RegEx.md)
1426

@@ -18,7 +30,11 @@ Imports saved Regular Expressions.
1830

1931

2032

33+
34+
2135
---
36+
37+
2238
### Examples
2339
#### EXAMPLE 1
2440
```PowerShell
@@ -35,7 +51,11 @@ Import-Regex -FromModule AnotherModule # Imports Regular Expressions stored in a
3551
Import-RegEx -Name NextWord
3652
```
3753

54+
55+
3856
---
57+
58+
3959
### Parameters
4060
#### **FilePath**
4161

@@ -47,13 +67,12 @@ Files should be named $Name.regex.txt or $Name.regex.ps1
4767

4868

4969

50-
|Type |Required|Position|PipelineInput |
51-
|------------|--------|--------|---------------------|
52-
|`[String[]]`|false |1 |true (ByPropertyName)|
70+
|Type |Required|Position|PipelineInput |Aliases |
71+
|------------|--------|--------|---------------------|--------|
72+
|`[String[]]`|false |1 |true (ByPropertyName)|Fullname|
5373

5474

5575

56-
---
5776
#### **FromModule**
5877

5978
If provided, will get regular expressions from any number of already imported modules.
@@ -69,7 +88,6 @@ If provided, will get regular expressions from any number of already imported mo
6988

7089

7190

72-
---
7391
#### **Pattern**
7492

7593
One or more direct patterns to import
@@ -85,7 +103,6 @@ One or more direct patterns to import
85103

86104

87105

88-
---
89106
#### **Name**
90107

91108
The Name of the Regular Expression.
@@ -101,7 +118,6 @@ The Name of the Regular Expression.
101118

102119

103120

104-
---
105121
#### **PassThru**
106122

107123
If set, will output the imported regular expressions.
@@ -117,7 +133,11 @@ If set, will output the imported regular expressions.
117133

118134

119135

136+
137+
120138
---
139+
140+
121141
### Outputs
122142
* [Nullable](https://learn.microsoft.com/en-us/dotnet/api/System.Nullable)
123143

@@ -127,9 +147,12 @@ If set, will output the imported regular expressions.
127147

128148

129149

150+
151+
130152
---
153+
154+
131155
### Syntax
132156
```PowerShell
133157
Import-RegEx [[-FilePath] <String[]>] [[-FromModule] <String[]>] [[-Pattern] <String[]>] [[-Name] <String[]>] [-PassThru] [<CommonParameters>]
134158
```
135-
---

0 commit comments

Comments
 (0)