开发者

Find lines matching regex and select a different part of the line

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜