How to grep for a pattern matching from a text file? I have a string like below.
2018-04-10 08:10:35 M2686678688 abc-jhg-jj-kjk
<accepted> M1236687688</accepted>
I am using like below:
Get-ChildItem $path\a.txt | Select-String "M(\d{10})"
Not sure how to get only the matching string from the above. Desired output should be:
M2686678688 M123668768