I have two lines like below:
/pace =builtin\administrators Type=0x0 Flags=0x13 AccessMask=0x1f01ff
/pace =domain\user Type=0x0 Flags=0x13 AccessMask=0x1f01ff
Need to create a regular expression where it only select 0x1f01ff
where the line have domain\user
.
This is what I have created but it select /pace =domain\user Type=0x0 Flags=0x13 AccessMask=
:
^(.+domain(.*开发者_开发问答)accessmask=)
try this:
^.+domain\\user.+AccessMask=([^\s]+)
It matches any line that has domain\user and then get the value of accessmask (any character that is not a whitespace)
精彩评论