Skip to content

Commit f3f1937

Browse files
Merge pull request #142 from StartAutomating/IrregularANSI
Irregular ansi
2 parents d30d73a + f3c334a commit f3f1937

Some content is hidden

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

58 files changed

+761
-181
lines changed

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1-
## 0.7.1:
1+
## 0.7.2:
2+
* Lots More ANSI support:
3+
* ?<ANSI_Bold> (Fixes #131)
4+
* ?<ANSI_Blink> (Fixes #132)
5+
* ?<ANSI_Faint> (Fixes #133)
6+
* ?<ANSI_Hide> (Fixes #134)
7+
* ?<ANSI_Invert> (Fixes #135)
8+
* ?<ANSI_Italic> (Fixes #136)
9+
* ?<ANSI_Reset> (Fixes #137)
10+
* ?<ANSI_Strikethrough> (Fixes #138)
11+
* ?<ANSI_Underline> (Fixes #139)
12+
* ?<ANSI_Style> (Fixes #140)
13+
* ?<ANSI_Note>: Fixing capture names (Fixes #130)
14+
---
15+
16+
## 0.7.1:
217
* New Pattern:
318
* ?<ANSI_Note> (Match ANSI VT520 / DECPS note sequences) (Fixes #127)
419
* Updated Patterns:

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.2: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
2+
<!-- Generated with EZOut 1.9.3: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
33
<Configuration>
44
<ViewDefinitions>
55
<View>

Irregular.psd1

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
ModuleVersion = '0.7.1'
2+
ModuleVersion = '0.7.2'
33
RootModule = 'Irregular.psm1'
44
Description = 'Regular Expressions made Strangely Simple'
55
FormatsToProcess = 'Irregular.format.ps1xml'
@@ -14,6 +14,21 @@
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.2:
18+
* Lots More ANSI support:
19+
* ?<ANSI_Bold> (Fixes #131)
20+
* ?<ANSI_Blink> (Fixes #132)
21+
* ?<ANSI_Faint> (Fixes #133)
22+
* ?<ANSI_Hide> (Fixes #134)
23+
* ?<ANSI_Invert> (Fixes #135)
24+
* ?<ANSI_Italic> (Fixes #136)
25+
* ?<ANSI_Reset> (Fixes #137)
26+
* ?<ANSI_Strikethrough> (Fixes #138)
27+
* ?<ANSI_Underline> (Fixes #139)
28+
* ?<ANSI_Style> (Fixes #140)
29+
* ?<ANSI_Note>: Fixing capture names (Fixes #130)
30+
---
31+
1732
## 0.7.1:
1833
* New Pattern:
1934
* ?<ANSI_Note> (Match ANSI VT520 / DECPS note sequences) (Fixes #127)

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.2: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
2+
<!-- Generated with EZOut 1.9.3: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
33
<Types>
44
<Type>
55
<Name>Irregular.Match.Extract</Name>

README.md

Lines changed: 2 additions & 2 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.1'>v 0.7.1 </a>
6+
<a href='https://github.com/StartAutomating/Irregular/releases/tag/v0.7.2'>v 0.7.2 </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 119 useful [named expressions](SavedPatterns.md), and lets you create more.
35+
Irregular comes with 128 useful [named expressions](SavedPatterns.md), and lets you create more.
3636

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

RegEx/ANSI/Blink.regex.source.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
$myName = ($MyInvocation.MyCommand.ScriptBlock.File | Split-Path -Leaf) -replace '\.source', '' -replace '\.ps1', '.txt'
2+
$myRoot = $MyInvocation.MyCommand.ScriptBlock.File | Split-Path
3+
4+
New-RegEx -Description "Matches ANSI Blink Start or End" |
5+
New-RegEx -CharacterClass Escape -Comment 'An Escape' |
6+
New-RegEx -LiteralCharacter '[' -Comment 'Followed by a bracket' |
7+
New-RegEx -Atomic -Or -Pattern @(
8+
New-RegEx -Name "BlinkStart" -Atomic -Or @(
9+
New-RegEx -Name "BlinkSlow" -Pattern '5m' -Comment '5m starts a slow blink'
10+
New-RegEx -Name "BlinkFast" -Pattern '6m' -Comment '6m starts a slow blink'
11+
)
12+
New-RegEx -Name "BlinkEnd" -Pattern '25m' -Comment "25m stops blinks"
13+
) |
14+
Set-Content -Path (Join-Path $myRoot $myName)

RegEx/ANSI/Blink.regex.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Matches ANSI Blink Start or End
2+
\e # An Escape
3+
\[ # Followed by a bracket
4+
(?>
5+
(?>
6+
(?<BlinkStart>(?<BlinkSlow>5m) # 5m starts a slow blink
7+
|
8+
(?<BlinkFast>6m) # 6m starts a slow blink
9+
)) |
10+
(?<BlinkEnd>25m) # 25m stops blinks
11+
)

RegEx/ANSI/Bold.regex.source.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
$myName = ($MyInvocation.MyCommand.ScriptBlock.File | Split-Path -Leaf) -replace '\.source', '' -replace '\.ps1', '.txt'
2+
$myRoot = $MyInvocation.MyCommand.ScriptBlock.File | Split-Path
3+
4+
New-RegEx -Description "Matches an ANSI Bold (aka bright) Start or End" |
5+
New-RegEx -CharacterClass Escape -Comment 'An Escape' |
6+
New-RegEx -LiteralCharacter '[' -Comment 'Followed by a bracket' |
7+
New-RegEx -Atomic -Or -Pattern @(
8+
New-RegEx -Name "BoldStart" -Pattern '1m' -Comment "1m starts bold"
9+
New-RegEx -Name "BoldEnd" -Pattern '22m' -Comment '22m stops bold'
10+
) |
11+
Set-Content -Path (Join-Path $myRoot $myName)

RegEx/ANSI/Bold.regex.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Matches an ANSI Bold Start or End
2+
\e # An Escape
3+
\[ # Followed by a bracket
4+
(?>
5+
(?<BoldStart>1m) |
6+
(?<BoldEnd>22m))

RegEx/ANSI/Faint.regex.source.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
$myName = ($MyInvocation.MyCommand.ScriptBlock.File | Split-Path -Leaf) -replace '\.source', '' -replace '\.ps1', '.txt'
2+
$myRoot = $MyInvocation.MyCommand.ScriptBlock.File | Split-Path
3+
4+
New-RegEx -Description "Matches an ANSI Faint (aka dim) Start or End" |
5+
New-RegEx -CharacterClass Escape -Comment 'An Escape' |
6+
New-RegEx -LiteralCharacter '[' -Comment 'Followed by a bracket' |
7+
New-RegEx -Atomic -Or -Pattern @(
8+
New-RegEx -Name "FaintStart" -Pattern '2m' -Comment "2m starts faint"
9+
New-RegEx -Name "FaintEnd" -Pattern '22m' -Comment '22m stops faint'
10+
) |
11+
Set-Content -Path (Join-Path $myRoot $myName)

0 commit comments

Comments
 (0)