Regular Expression to find a string included between two characters while EXCLUDING the delimiters

前端 未结 12 2649
旧时难觅i
旧时难觅i 2020-11-21 23:49

I need to extract from a string a set of characters which are included between two delimiters, without returning the delimiters themselves.

A simple example should b

12条回答
  •  滥情空心
    2020-11-22 00:16

    If you need extract the text without the brackets, you can use bash awk

    echo " [hola mundo] " | awk -F'[][]' '{print $2}'

    result:

    hola mundo

提交回复
热议问题