Skip to content

Simple library to find all phone numbers contain in a text.

Notifications You must be signed in to change notification settings

ladifire-opensource/go-parse-phones

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-parse-phones

Simple library to detect phone numbers in a string.

Example

package main

import (
	"fmt"
	"github.com/ladifire-opensource/go-parse-phones"
)

func main() {
	message := "This is phone number: 0912525555. Other number 0943 311 366, and other number +84 968 552 221"
	phoneNumbers := goparsephone.FindInText(message, goparsephone.TypeAll)
	fmt.Println(phoneNumbers)
  // output: [{0912525555 +84912525555 Vinaphone 22 32} {0943 311 366 +84943311366 Vinaphone 47 59} {+84 968 552 221 +84968552221 Viettel 78 93}]
}

You can view this example online here

Notes

This package only suport Vietnamese phone numbers yet. Other countries will be supported in the next version

About

Simple library to find all phone numbers contain in a text.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages