Skip to content

Commit 9861ccd

Browse files
Merge pull request #169 from StartAutomating/Irregular-Improvement
Irregular improvement
2 parents 0bfcfd2 + e037377 commit 9861ccd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+232
-117
lines changed

.github/workflows/RunIrregularAction.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
## 0.7.5:
1+
## 0.7.6:
2+
3+
* New-RegEx improvements:
4+
* Now supporting new character classes: MarkSpacing, MarkEnclosing, MarkNonEnclosing (Fixes #168)
5+
6+
* More CSharp Patterns:
7+
* ?<CSharp_Class> (Fixes #164)
8+
* ?<CSharp_Identifier> (Fixes #165)
9+
10+
* Improved Patterns:
11+
* ?<ANSI_4BitColor>/?<ANSI_Style>: Handling brightness bit before or after color (Fixes #166)
12+
13+
---
14+
15+
## 0.7.5:
216

317
* Added Patterns for Liquid:
418
* ?<Liquid_Expression> (Fixes #153)

Irregular.GitHubWorkflow.PSDevops.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Push-Location $PSScriptRoot
33

44
Import-BuildStep -ModuleName Irregular
5-
New-GitHubWorkflow -Name "Test, Tag, Release, and Publish" -Job PowerShellStaticAnalysis, TestPowerShellOnLinux, TagReleaseAndPublish, BuildModule -On Push, Demand |
5+
New-GitHubWorkflow -Name "Test, Tag, Release, and Publish" -Job PowerShellStaticAnalysis, TestPowerShellOnLinux, TagReleaseAndPublish, BuildIrregular -On Push, Demand |
66
Set-Content .\.github\workflows\IrregularTests.yml -Encoding UTF8 -PassThru
77

88
New-GitHubWorkflow -Name "Run GitHub Action" -On Push, Demand -Job UseIrregularAction |

Irregular.format.ps1xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-16"?>
2-
<!-- Generated with EZOut 1.9.6: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
2+
<!-- Generated with EZOut 1.9.7: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
33
<Configuration>
44
<ViewDefinitions>
55
<View>

Irregular.psd1

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
ModuleVersion = '0.7.5'
2+
ModuleVersion = '0.7.6'
33
RootModule = 'Irregular.psm1'
44
Description = 'Regular Expressions made Strangely Simple'
55
FormatsToProcess = 'Irregular.format.ps1xml'
@@ -14,6 +14,20 @@
1414
LicenseURI = 'https://github.com/StartAutomating/Irregular/blob/master/LICENSE'
1515
IconURI = 'https://github.com/StartAutomating/Irregular/blob/master/Assets/Irregular_600_Square.png'
1616
ReleaseNotes = @'
17+
## 0.7.6:
18+
19+
* New-RegEx improvements:
20+
* Now supporting new character classes: MarkSpacing, MarkEnclosing, MarkNonEnclosing (Fixes #168)
21+
22+
* More CSharp Patterns:
23+
* ?<CSharp_Class> (Fixes #164)
24+
* ?<CSharp_Identifier> (Fixes #165)
25+
26+
* Improved Patterns:
27+
* ?<ANSI_4BitColor>/?<ANSI_Style>: Handling brightness bit before or after color (Fixes #166)
28+
29+
---
30+
1731
## 0.7.5:
1832
1933
* Added Patterns for Liquid:

Irregular.types.ps1xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-16"?>
2-
<!-- Generated with EZOut 1.9.6: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
2+
<!-- Generated with EZOut 1.9.7: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
33
<Types>
44
<Type>
55
<Name>Irregular.Match.Extract</Name>

New-RegEx.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@
8282
'CombiningMark' ,'\p{Mc}',
8383
'EnclosingMark' , '\p{Me}',
8484
'Mark' , '\p{M}',
85+
'MarkSpacing' , '\p{Mc}',
86+
'MarkNonSpacing' , '\p{Mn}',
87+
'MarkEnclosing' , '\p{Me}',
8588
'Number' , '\p{N}',
8689
'NumberDecimalDigit' , '\p{Nd}',
8790
'NumberLetter' , '\p{Nl}',

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h2>Regular Expressions made Strangely Simple</h2>
44
<h3>A PowerShell module that helps you understand, use, and build Regular Expressions.</h3>
55
<h4>
6-
<a href='https://github.com/StartAutomating/Irregular/releases/tag/v0.7.5'>v 0.7.5 </a>
6+
<a href='https://github.com/StartAutomating/Irregular/releases/tag/v0.7.6'>v 0.7.6 </a>
77
</h4>
88
<a href='https://www.powershellgallery.com/packages/Irregular/'>
99
<img src='https://img.shields.io/powershellgallery/dt/Irregular' />
@@ -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 133 useful [named expressions](SavedPatterns.md), and lets you create more.
35+
Irregular comes with 134 useful [named expressions](SavedPatterns.md), and lets you create more.
3636

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

@@ -72,7 +72,7 @@ New-RegEx -StartAnchor StringStart -Pattern @(
7272

7373
Irregular also contains a colorized PowerShell formatter for all Regular Expressions.
7474
This provides syntax highlighting that can make complicated expressions easier to read.
75-
![RegexSyntaxHighlighting](assets/images/RegexSyntaxHighlighting.gif)
75+
![RegexSyntaxHighlighting](assets/RegexSyntaxHighlighting.gif)
7676

7777

7878
#### Building Regular Expressions

README.ps1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ New-RegEx -StartAnchor StringStart -Pattern @(
8282

8383
Irregular also contains a colorized PowerShell formatter for all Regular Expressions.
8484
This provides syntax highlighting that can make complicated expressions easier to read.
85-
![RegexSyntaxHighlighting](assets/images/RegexSyntaxHighlighting.gif)
85+
![RegexSyntaxHighlighting](assets/RegexSyntaxHighlighting.gif)
8686

8787

8888
#### Building Regular Expressions

RegEx/ANSI/4BitColor.regex.source.ps1

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,28 @@ New-RegEx -Description "Matches an ANSI 3 or 4-bit color" |
77
New-RegEx -Pattern (
88

99
New-RegEx -Atomic -Or @(
10+
1011
New-RegEx -Pattern 1 -Optional -Name IsBright |
11-
New-RegEx -LiteralCharacter ';' -Min 0 -Max 1 |
12-
New-RegEx -Pattern '3' -Name IsForegroundColor
13-
12+
New-RegEx -LiteralCharacter ';' -Min 0 -Max 1 -Comment "A 1 and a semicolon indicate a bright color" |
13+
New-RegEx -Pattern '3' -Name IsForegroundColor -Comment "A number that starts with 3 indicates foreground color"
14+
1415
New-RegEx -Name IsBright (
1516
New-RegEx -Pattern '9' -Name IsForegroundColor
16-
)
17+
) -Comment "OR it could be a less common bright foreground color, which starts with 9"
1718

1819
New-RegEx -Pattern 1 -Optional -Name IsBright |
19-
New-RegEx -LiteralCharacter ';' -Min 0 -Max 1 |
20-
New-RegEx -Pattern '4' -Name IsBackgroundColor
20+
New-RegEx -LiteralCharacter ';' -Min 0 -Max 1 -Comment "A 1 and a semicolon indicate a bright color"|
21+
New-RegEx -Pattern '4' -Name IsBackgroundColor -Comment "A number that starts with 3 indicates foreground color"
2122

2223
New-RegEx -Name IsBright (
2324
New-RegEx -Pattern '10' -Name IsBackgroundColor
24-
)
25-
) |
26-
New-RegEx -Pattern '[0-7]' -Name ColorNumber |
25+
) -Comment "OR it could be a less common bright foreground color, which starts with 9"
26+
) |
27+
New-RegEx -Pattern '[0-7]' -Name ColorNumber -Comment "The color number will be between 0 and 7" |
28+
New-RegEx -NoCapture -Optional @(
29+
New-RegEx -LiteralCharacter ';' -Min 0 -Max 1 |
30+
New-RegEx -Pattern 1 -Optional -Name IsBright
31+
) -Comment "Brightness can also come after a color" |
2732
New-RegEx -LiteralCharacter 'm'
28-
) -Name Color | #>
29-
Set-Content -Path (Join-Path $myRoot $myName)
33+
) -Name Color |
34+
Set-Content -Path (Join-Path $myRoot $myName) -PassThru

0 commit comments

Comments
 (0)