quran-go

Read Qur'an right in the terminal.
git clone http://git.hanabi.in/repos/quran-go.git
Log | Files | Refs | README | LICENSE

format-aayat.go (299B)


      1 package utils
      2 
      3 import "regexp"
      4 
      5 // Regex fix an Aayah to remove things like <sup foot_note=76373>1</sup>
      6 func FormatAayat(aayat string) (formattedAayat string) {
      7 
      8 	reg := regexp.MustCompile(`<sup foot_note=\d+>\d+<\/sup>`)
      9 	formattedAayat = reg.ReplaceAllString(aayat, "")
     10 	return formattedAayat
     11 
     12 }