Skip to content

Commit

Permalink
Updating workflow (Fixes #112, Fixes #109)
Browse files Browse the repository at this point in the history
  • Loading branch information
StartAutomating authored and StartAutomating committed Aug 9, 2022
1 parent 96d105c commit 2558cf3
Showing 1 changed file with 129 additions and 116 deletions.
245 changes: 129 additions & 116 deletions Irregular.types.ps1xml
Original file line number Diff line number Diff line change
@@ -1,137 +1,150 @@
<?xml version="1.0" encoding="utf-16"?>
<!-- Generated with EZOut 1.8.3.1: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
<Types>
<Type>
<Name>Irregular.Regular.Expression</Name>
<Members>
<ScriptProperty>
<Name>GroupNames</Name>
<?xml version="1.0" encoding="utf-16"?>
<!-- Generated with EZOut 1.8.9: Install-Module EZOut or https://github.com/StartAutomating/EZOut -->
<Types>
<Type>
<Name>Irregular.Match.Extract</Name>
<Members>
<ScriptProperty IsHidden="true">
<Name>EndIndex</Name>
<GetScriptBlock>

$this.Match.Index + $this.Match.Length

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty IsHidden="true">
<Name>Input</Name>
<GetScriptBlock>
$this.Match.Result('$_')

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty IsHidden="true">
<Name>StartIndex</Name>
<GetScriptBlock>
$this.Match.Index

</GetScriptBlock>
</ScriptProperty>
</Members>
</Type>
<Type>
<Name>Irregular.Regular.Expression</Name>
<Members>
<ScriptProperty>
<Name>GroupNames</Name>
<GetScriptBlock>

if ($this -is [Regex]) {
$this.GetGroupNames()
}
else { @() }

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Pattern</Name>
<GetScriptBlock>
$this.ToString()
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>IsValid</Name>

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>IsValid</Name>
<GetScriptBlock>
if ($this -is [Regex]) { $true } else { $false }
</GetScriptBlock>
</ScriptProperty>
</Members>
</Type>
<Type>
<Name>Irregular.Match.Extract</Name>
<Members>
<ScriptProperty IsHidden="true">
<Name>Input</Name>
if ($this -is [Regex]) { $true } else { $false }

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Pattern</Name>
<GetScriptBlock>
$this.Match.Result('$_')
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty IsHidden="true">
<Name>StartIndex</Name>
<GetScriptBlock>
$this.Match.Index
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty IsHidden="true">
<Name>EndIndex</Name>
<GetScriptBlock>
$this.Match.Index + $this.Match.Length
</GetScriptBlock>
</ScriptProperty>
</Members>
</Type>
<Type>
<Name>System.Text.RegularExpressions.Match</Name>
<Members>
<ScriptMethod>
<Name>Peek</Name>
$this.ToString()

</GetScriptBlock>
</ScriptProperty>
</Members>
</Type>
<Type>
<Name>System.Text.RegularExpressions.Match</Name>
<Members>
<ScriptMethod>
<Name>Peek</Name>
<Script>
param([int]$Length = 1)
if ($Length -gt 0) {
if ($this.After.Length -gt $Length) {
$this.After.Substring(0,$Length)
} elseif ($this.After) {
$this.After.Substring(0)
}
} elseif ($Length -lt 0) {
$Length *= -1
if ($this.Before.Length -gt $Length) {
$this.Before.Substring($this.Before.Length - $Length)
} elseif ($this.Before) {
$this.Before
}
}

</Script>
</ScriptMethod>
<ScriptProperty>
<Name>Line</Name>
param([int]$Length = 1)
if ($Length -gt 0) {
if ($this.After.Length -gt $Length) {
$this.After.Substring(0,$Length)
} elseif ($this.After) {
$this.After.Substring(0)
}
} elseif ($Length -lt 0) {
$Length *= -1
if ($this.Before.Length -gt $Length) {
$this.Before.Substring($this.Before.Length - $Length)
} elseif ($this.Before) {
$this.Before
}
}
</Script>
</ScriptMethod>
<ScriptProperty>
<Name>After</Name>
<GetScriptBlock>

[Regex]::new('(?&gt;\r\n|\n|\A)', 'RightToLeft').Matches($this.Input, $this.Index).Count

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>EndIndex</Name>
<GetScriptBlock>
$this.Index + $this.Length
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>After</Name>
<GetScriptBlock>
$this.Result('$''')
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Before</Name>
$this.Result('$''')

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Before</Name>
<GetScriptBlock>
$this.Result('$`')
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Column</Name>
$this.Result('$`')

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Column</Name>
<GetScriptBlock>

$this.Index -
$(
$m = [Regex]::new('(?&gt;\r\n|\n|\A)', 'RightToLeft').Match($this.Input, $this.Index)
$m.Index + $m.Length
) + 1

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Input</Name>

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>EndIndex</Name>
<GetScriptBlock>
$this.Result('$_')
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>LastGroup</Name>
$this.Index + $this.Length

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Input</Name>
<GetScriptBlock>
$this.Result('$+')
</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>StartIndex</Name>
$this.Result('$_')

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>LastGroup</Name>
<GetScriptBlock>
$this.Result('$+')

</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>Line</Name>
<GetScriptBlock>

[Regex]::new('(?&gt;\r\n|\n|\A)', 'RightToLeft').Matches($this.Input, $this.Index).Count


</GetScriptBlock>
</ScriptProperty>
<ScriptProperty>
<Name>StartIndex</Name>
<GetScriptBlock>
$this.Index
</GetScriptBlock>
</ScriptProperty>
</Members>
</Type>
</Types>
$this.Index

</GetScriptBlock>
</ScriptProperty>
</Members>
</Type>
</Types>

0 comments on commit 2558cf3

Please sign in to comment.