mirror of https://github.com/fmartingr/bazaar.git
12 lines
195 B
Go
12 lines
195 B
Go
|
package utils
|
||
|
|
||
|
import (
|
||
|
"regexp"
|
||
|
"strings"
|
||
|
)
|
||
|
|
||
|
func ExtractPrice(raw string) string {
|
||
|
re := regexp.MustCompile("[^0-9,.]+")
|
||
|
return strings.Replace(re.ReplaceAllString(raw, ""), ",", ".", 1)
|
||
|
}
|