kjacobsen icon

Regular Expressions in Powershell

kjacobsen | PRO | 04/02/12 10:07:08 AM UTC | 0 ⭐ | 283 👁️ | Never ⏰ | []
PowerShell |

320 B

|

None

|

0 👍

/

0 👎

#$regularexpression will contain our regular expression, which in the example is 'href="/........">'
$regularexpression=New-Object Text.RegularExpressions.Regex 'href="/........">',("Singleline", "IgnoreCase")
 
#$regexmatches will contain the resulting matches
$regexmatches = $regularexpression.matches($contentvariable)

Comments