Powershell – print only text between quotes?

Question:

How can I have the output of the following text only show the text in the quotes (without the quotes)?

Sample text”

becomes:

Ideally I’d like to do it in a one liner if possible. I think it’s regular expression with -match but I’m not sure.

Answer:

here is one way

This is the winning solution

Source:

Powershell – print only text between quotes? by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply