Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- re="\(([^()]|(?R))*\)"
- array=(
- "[macdoll(マコ(・c_・))]shutter chance!!(ラブライブ)"
- "[しろむじ(ん坊主)]まる限定。((G)えでぃしょん)"
- "[PASTEL WING(如月あいす)]アイスフレンド(嫁)03(ガール(仮))"
- "x(1)x((2)2)(3(33))x((4((44))))x"
- )
- for s in "${array[@]}"
- do
- echo $s
- echo ---
- echo $s | grep -Po $re
- echo
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement