Using -replace to Extract Match from Multiline Text File

Hello, I would like to ask, how could I extract ID 1234 from multiline text file such as this:

aaaaaaaaaaaaa

bbbbbbbbbbb

ID 1234

ccccccccc

ddddddddd

something_else_id 3135

eeeeeeere

Currently I get 3135 as a result, instead of 1234. Also, for some reason ^ in regex doesn’t work here.

submitted by /u/vincius0000
[link] [comments]

Leave a Reply