S
S
Shimpanze2017-03-03 05:08:02
PHP
Shimpanze, 2017-03-03 05:08:02

XPath: How to find a node followed by an empty string?

Hello!
You need to iterate over all nodes followed by an empty string or a string with whitespace characters.
I'm looking like this:

if( preg_match( '/^[\s\S]+$\r?\n[\s]+/miu', $element->c14n() ) ) {
    echo $element->c14n() . PHP_EOL;
}

does not find nodes with one empty line between them...
Or tell me how to find all empty lines BETWEEN nodes.
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2017-03-03
@dimonchik2013

so XPAth or Regexp ? Xpathu empty lines don't care

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question