Closed davetustin closed 6 months ago
When I pass my regular expression to Write-EZLog I get the following error.
Write-EZLog: Error formatting a string: Index (zero based) must be greater than or equal to zero and less than the size of the argument list..
The regular expression I am using is M(?<!\d)\d{9}(?!\d).
My hunch is it thinks the {9} is a placeholder.
I have yet to find a way around this, but still investigating. If you have any ideas, that would be fantastic.
In the end I escaped the curly brackets using -replace "{", "{{" -replace "}", "}}"
-replace "{", "{{" -replace "}", "}}"
That seems to fix it.
When I pass my regular expression to Write-EZLog I get the following error.
Write-EZLog: Error formatting a string: Index (zero based) must be greater than or equal to zero and less than the size of the argument list..
The regular expression I am using is M(?<!\d)\d{9}(?!\d).
My hunch is it thinks the {9} is a placeholder.
I have yet to find a way around this, but still investigating. If you have any ideas, that would be fantastic.