.01
.02
.03
.04
.05
.06
.07
.08
.09
.10
.11
.12
.13
.14
.15
.16
.17
.18
.19
.20
.21
.22
.23
.24
.25
.26
.27
.28
.29
.30
.31
|
|
<?php
/******************************************************************************/
/* */
/* __ ____ */
/* ___ / / ___ / __/__ __ _____________ ___ */
/* / _ \/ _ \/ _ \_\ \/ _ \/ // / __/ __/ -_|_-< */
/* / .__/_//_/ .__/___/\___/\_,_/_/ \__/\__/___/ */
/* /_/ /_/ */
/* */
/* */
/******************************************************************************/
/* */
/* Titre : Cherche le numero de telephone fixe */
/* */
/* URL : http://www.phpsources.org/scripts272-PHP.htm */
/* Auteur : Olivier */
/* Date édition : 18 Mai 2007 */
/* */
/******************************************************************************/
// Telephone fixe
$tel = "04 01 01 01 01";
if(ereg("[0][1234589][- \.—]?([0-9][0-9][- \.—]?){4}$", $tel))
echo "Le numero du fixe est vrai : $tel";
else
echo "Le numero du fixe est faux : $tel <br />";
// Affiche : Le numero du fixe est vrai : 04 01 01 01 01
?>
|