I´ve got a problem with a powershell script which i user for a nagios check.
the script gets an argument from nagios and need to format it correctly.
I get “REF:,user1,user2,user2,:REF\randomtext” from the nagios.
Now i need to ignore everything bevore and after the :REF / REF: (also the REF), i need only the users.
I´ve tried it with regex (?<=REF:)(.*)(?=:REF) but i cant use the output correctly.
maybe someone got an idea how i could fix this?