I
I
Ilya Beloborodov2015-10-21 15:18:10
PHP
Ilya Beloborodov, 2015-10-21 15:18:10

How to find all characters including tabs and newlines?

How to select all characters including wrapping to a new line
I tried this way
<p>(.*)(.\n)<\/p>
I’m not strong in regulars, please help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Optimus, 2015-10-21
@kowap

All characters in a paragraph? Then:

preg_match("/<p>(.*?)<\/p>/ism", $text, $result);
// Это результат с Р $result[0];
// Это результат без Р т.е. чисто между ними что было $result[1];

All in < img tag All in img
tags
preg_match_all("/<img(.*?)>/ism", $text, $result);
var_dump($result);

A
Andrew, 2015-10-21
@R0dger

https://regex101.com/r/gG3nD8/2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question