in reply to Re^3: problem with optional capture group
in thread problem with optional capture group
m{ <div (?: (?! </div) .)+ (</div)? }xms)
Can you please give a brief explanation regarding how the above regex works? It seems to use a few constructs I've never seen before and searching Google for regex symbols doesn't work very well. In particular, is enclosing a regex in 'm()', as you have done above, equivalent to enclosing it in '//'? What is the trailing xms doing?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: problem with optional capture group
by AnomalousMonk (Archbishop) on Dec 23, 2020 at 20:54 UTC |