Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Find and Replace using RegEx

$
0
0

Can anyone help?

I have a script to find a regex of information, my question is :-

can I replace the items matched with with another regex?

such as ... $item -replace $regex , $regex2

or

with an array, so I can replace each unique match with a different item from an array.

so ... Item1,Item2,Item3

becomes ... somethinga,another4,whatever8a1

Regards

Kev


kittuk


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>