I've got the below sample text
Hello | World
<Hi | Hello|How | are | you><test|string |for |regex>
sample | text <however|replace|pipe>
to be converted as below
Hello | World
<Hi ~ Hello~How ~ are ~ you><test~string ~for ~regex>
sample | text <however~replace~pipe>
i.e. Replace |
within <>
with ~
I tried this <(?:.*?)(\|)(?:.*?)>
(http://regex101.com/r/mX1sO0)
But it matches only the first |
withing the angle <>
. And I am not sure how to replace it. Any directions?