Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
((0[1-9])|(4[0-2])|(4[4-9])|(5[4-9])|(6[0-1])|6[5-7]|(77)|(75))[0-9]{6}
/

Description

This script is about testing the validity of celphones from Ivory Coast (+225). The number must start with one of the prefix listed bellow and have 8 caracters long.

Moov 01, 02, 03, 40, 41 ou 42 MTN 04, 05, 06, 44, 45, 46, 54, 55 , 56,75 Orange 07, 08, 09, 47, 48, 49, 57, 58, 59, 77 Green Network (GreenN)/Oricel 60 ou 61 Koz 65, 66 ou 67

P.S. It's have been made in 2014. Think updating it if new prefix are added!

Have fun while using it!

Submitted by Alain Zio - 10 years ago