Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

can any one give me Regex to match any character including new lines

user-image
Question ajoutée par Zaid Rabab'a , Software Development Team Leader , Al-Safa Co. Ltd.
Date de publication: 2013/09/18
Umar Alharaky
par Umar Alharaky , Senior Systems Analyst & Quality Control , StarWays IT

Try this: 

(.|\n)*

In regular expressions, the dot or period is one of the most commonly used metacharacters. Unfortunately, it is also the most commonly misused metacharacter.

The dot matches a single character, without caring what that character is. The only exception are line break characters. In all regex flavors discussed in this tutorial, the dot does not match line breaks by default.

Hamdan AbuTaima
par Hamdan AbuTaima , System Developer , SelectMix.com

the correct REGX

.*\\r\\n

Utilisateur supprimé
par Utilisateur supprimé

try

.|\n

Louy Alakkad
par Louy Alakkad , Front End Developer , Alpha Apps

Use the "s" modifier

 

preg_match('/.*/s', $text, $match);

 

More Questions Like This