Code:
package main
import (
    "fmt"
    "regexp"
)
func main() {
    r := regexp.MustCompile(`((.*))`)
    s := `(tag)SomeText`
    res := r.FindStringSubmatch(s)
    fmt.Println(res[1])
}
How to Get Value inside parentheses?
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