Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import (
- "fmt"
- "regexp"
- )
- const sample = `سلام دنیا hello world 1 %^&`
- func main() {
- var re = regexp.MustCompile(`~[p{L}0-9s]+`)
- s := re.ReplaceAllString(sample, `-`)
- fmt.Println(s)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement