ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

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

user-image
تم إضافة السؤال من قبل Zaid Rabab'a , Technical Team Lead , ESKADENIA Software
تاريخ النشر: 2013/09/18
Umar Alharaky
من قبل Umar Alharaky , Senior Systems Analyst & Quality Control , StarWays IT

Try this: 

(.|\n)*

surbhi goyal
من قبل surbhi goyal

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
من قبل Hamdan AbuTaima , System Developer , SelectMix.com

the correct REGX

.*\\r\\n

Louy Alakkad
من قبل Louy Alakkad , Front End Developer , Alpha Apps

Use the "s" modifier

 

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

 

المزيد من الأسئلة المماثلة