I'm using the following Powershell command... not an expert at all, so willing to try different ways.
select-string -path *.html -pattern $pattern -allmatches |
foreach-object {write-host $_.filename; $_.matches} |
foreach-object {$_.groups[1].value}
I would like to group all of the matches belonging to a file like
filename.html
match
match
filename2.html
match
and so on...
Can I do this using the approach above, if so, how? If not, could you suggest a better way?
Thank you!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.