none
split string to array RRS feed

  • Frage

  • Hello!

    I have a string that I want to split in an array

    string: "(text1)(text2)(text3)"

    I want to get an array with the 3 textfields inside the "()"

    How can I do this?

    I have tried with regex.

    $r = [regex] "\([^\(\)]+\)"
    $match = $r.match($MyString)
    

    But I only get the text in first Brackets

    rg

    Hansi

    Donnerstag, 16. Juli 2020 11:16

Antworten

Alle Antworten