9951 explained code solutions for 126 technologies


golangHow to do case-insensitive regexp


package main
import "regexp"

func main() {
  mtch, _ := regexp.MatchString(`(?i)oh[0-9]`, "OH2f3")
  print(mtch)
}ctrl + c
package main

default package declaration

func main() {

declare main function that will be launched automatically

regexp.MatchString(

match given string with a given pattern

(?i)

this will make regex search case-insensitive