win7自带的正则表达式验证工具----powershell
最近项目中要用正则表达式,忽然想起powershell可以啊...用了一下,很爽...
下面给个例子
$str = 'eax=77431182 ebx=7ffd8000 ecx=00000000 edx=00123689 esi=00000000 edi=00000000'
$str1 = 'eip=00123689 esp=0023f7e4 ebp=0023f7ec iopl=0 nv up ei pl zr na pe nc'
$str -match 'eax=({8}) ebx=({8}) ecx=({8}) edx=({8}) esi=({8}) edi=({8})'
$matches
输出
6 00000000
5 00000000
4 00123689
3 00000000
2 7ffd8000
1 77431182
0 eax=77431182 ebx=7ffd8000 ecx=00000000 edx=00123689 esi=00000000 edi=00000000
-match是正则验证,类似regex_search
验证完,将结果放在全局变量$matches中 谢谢楼主分享
页:
[1]