This works.
"<name> <substring>"[/.*<([^>]*)/,1]
=> "substring"
But I want to extract substring within [ and ].
input:
string = "123 [asd]"
output:
asd
Anyone can help me?
You can do:
"123 [asd]"[/\[(.*?)\]/, 1]
will return
"asd"
You can test it here: https://rextester.com/YGZEA91495
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With