V
V
Vladimir Grabko2016-07-22 19:34:31
go
Vladimir Grabko, 2016-07-22 19:34:31

How to do the same only in Go?

How to do string.Replace by expression? I need the same thing only on Go,
str.replace(/[^-0-9]/gim,'')
I only learned to usestrings.Replace(value, NumbeRight, "", 2)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
#
#algooptimize #bottize, 2016-07-22
@VGrabko

https://golang.org/pkg/regexp/
Regulars
https://golang.org/pkg/strings/#NewReplacer
Without regulars, you can set an array.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question