|
1 | 1 | Import-RegEx |
2 | 2 | ------------ |
3 | 3 |
|
4 | | - |
5 | | - |
6 | | - |
7 | 4 | ### Synopsis |
8 | 5 | Imports Regular Expressions |
9 | 6 |
|
10 | | - |
11 | | - |
12 | 7 | --- |
13 | 8 |
|
14 | | - |
15 | 9 | ### Description |
16 | 10 |
|
17 | 11 | Imports saved Regular Expressions. |
18 | 12 |
|
19 | | - |
20 | | - |
21 | 13 | --- |
22 | 14 |
|
23 | | - |
24 | 15 | ### Related Links |
25 | 16 | * [Use-RegEx](Use-RegEx.md) |
26 | 17 |
|
27 | | - |
28 | | - |
29 | 18 | * [New-RegEx](New-RegEx.md) |
30 | 19 |
|
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | 20 | --- |
36 | 21 |
|
37 | | - |
38 | 22 | ### Examples |
39 | | -#### EXAMPLE 1 |
| 23 | +> EXAMPLE 1 |
| 24 | +
|
40 | 25 | ```PowerShell |
41 | 26 | Import-RegEx # Imports Regex from Irregular and the current directory. |
42 | 27 | ``` |
| 28 | +> EXAMPLE 2 |
43 | 29 |
|
44 | | -#### EXAMPLE 2 |
45 | 30 | ```PowerShell |
46 | 31 | Import-Regex -FromModule AnotherModule # Imports Regular Expressions stored in another module. |
47 | 32 | ``` |
| 33 | +> EXAMPLE 3 |
48 | 34 |
|
49 | | -#### EXAMPLE 3 |
50 | 35 | ```PowerShell |
51 | 36 | Import-RegEx -Name NextWord |
52 | 37 | ``` |
53 | 38 |
|
54 | | - |
55 | | - |
56 | 39 | --- |
57 | 40 |
|
58 | | - |
59 | 41 | ### Parameters |
60 | 42 | #### **FilePath** |
61 | | - |
62 | 43 | The path to one or more files or folders containing regular expressions. |
63 | 44 | Files should be named $Name.regex.txt or $Name.regex.ps1 |
64 | 45 |
|
65 | | - |
66 | | - |
67 | | - |
68 | | - |
69 | | - |
70 | 46 | |Type |Required|Position|PipelineInput |Aliases | |
71 | 47 | |------------|--------|--------|---------------------|--------| |
72 | 48 | |`[String[]]`|false |1 |true (ByPropertyName)|Fullname| |
73 | 49 |
|
74 | | - |
75 | | - |
76 | 50 | #### **FromModule** |
77 | | - |
78 | 51 | If provided, will get regular expressions from any number of already imported modules. |
79 | 52 |
|
80 | | - |
81 | | - |
82 | | - |
83 | | - |
84 | | - |
85 | 53 | |Type |Required|Position|PipelineInput| |
86 | 54 | |------------|--------|--------|-------------| |
87 | 55 | |`[String[]]`|false |2 |false | |
88 | 56 |
|
89 | | - |
90 | | - |
91 | 57 | #### **Pattern** |
92 | | - |
93 | 58 | One or more direct patterns to import |
94 | 59 |
|
95 | | - |
96 | | - |
97 | | - |
98 | | - |
99 | | - |
100 | 60 | |Type |Required|Position|PipelineInput | |
101 | 61 | |------------|--------|--------|---------------------| |
102 | 62 | |`[String[]]`|false |3 |true (ByPropertyName)| |
103 | 63 |
|
104 | | - |
105 | | - |
106 | 64 | #### **Name** |
107 | | - |
108 | 65 | The Name of the Regular Expression. |
109 | 66 |
|
110 | | - |
111 | | - |
112 | | - |
113 | | - |
114 | | - |
115 | 67 | |Type |Required|Position|PipelineInput | |
116 | 68 | |------------|--------|--------|---------------------| |
117 | 69 | |`[String[]]`|false |4 |true (ByPropertyName)| |
118 | 70 |
|
119 | | - |
120 | | - |
121 | 71 | #### **PassThru** |
122 | | - |
123 | 72 | If set, will output the imported regular expressions. |
124 | 73 |
|
125 | | - |
126 | | - |
127 | | - |
128 | | - |
129 | | - |
130 | 74 | |Type |Required|Position|PipelineInput| |
131 | 75 | |----------|--------|--------|-------------| |
132 | 76 | |`[Switch]`|false |named |false | |
133 | 77 |
|
134 | | - |
135 | | - |
136 | | - |
137 | | - |
138 | 78 | --- |
139 | 79 |
|
140 | | - |
141 | 80 | ### Outputs |
142 | 81 | * [Nullable](https://learn.microsoft.com/en-us/dotnet/api/System.Nullable) |
143 | 82 |
|
144 | | - |
145 | 83 | * [Management.Automation.PSObject](https://learn.microsoft.com/en-us/dotnet/api/System.Management.Automation.PSObject) |
146 | 84 |
|
147 | | - |
148 | | - |
149 | | - |
150 | | - |
151 | | - |
152 | 85 | --- |
153 | 86 |
|
154 | | - |
155 | 87 | ### Syntax |
156 | 88 | ```PowerShell |
157 | 89 | Import-RegEx [[-FilePath] <String[]>] [[-FromModule] <String[]>] [[-Pattern] <String[]>] [[-Name] <String[]>] [-PassThru] [<CommonParameters>] |
|
0 commit comments