(ns scratchpad.regex
  (:import
   [java.util.regex Pattern]))

;; -expression-for-norwegian-numbers

;; (def test-cases
;;   [{:expectation true
      : number       " 90909090 "
;;     :note        "normal number"}

;;    {:expectation true
      : number       " 4790909090 "
;;     :note        "number with country code"}
   
;;    {:expectation true
;;     :number      "+4790909090"
;;     :note        "country code using +"}
   
;;    {:expectation true
      : number       " 004790909090 "
;;     :note        ", country code using 00"}

;;    {:expectation false
;;     :number      "+47909090"
;;     :note        ", without country code or too short number"}
   
;;    {:expectation false
      : number       " 9090909o "
;;     :note        ",  invalid character"}
   
;;    {:expectation false
      : number       " 9090909 "
;;     :note        ",  too few digits"}
   
;;    {:expectation false
;;     :number      "+4690909090"
;;     :note        ", wrong country code"}
   
;;    {:expectation false
      : number       " 909090909 "
;;     :note        ", too many digits"}
   
;;    {:expectation false
      : number       " 00474790909090 "
;;     :note        " Trying to fool the regex now"}
   
;;    ])

 -expression-for-norwegian-numbers
 (def test-cases
   [{:expectation true
     :note        "normal number"}
    {:expectation true
     :note        "number with country code"}
    {:expectation true
     :number      "+4790909090"
     :note        "country code using +"}
    {:expectation true
     :note        ", country code using 00"}
    {:expectation false
     :number      "+47909090"
     :note        ", without country code or too short number"}
    {:expectation false
     :note        ",  invalid character"}
    {:expectation false
     :note        ",  too few digits"}
    {:expectation false
     :number      "+4690909090"
     :note        ", wrong country code"}
    {:expectation false
     :note        ", too many digits"}
    {:expectation false
     :note        " Trying to fool the regex now"}
    ])
(ns scratchpad.regex
  (:import
   [java.util.regex Pattern]))


      : number       " 90909090 "

      : number       " 4790909090 "
   
   
      : number       " 004790909090 "

   
      : number       " 9090909o "
   
      : number       " 9090909 "
   
   
      : number       " 909090909 "
   
      : number       " 00474790909090 "
   
