Quote:
Originally Posted by DNSB
I think the behaviour of Sigil's regex in returning the first line of each file is correct if the global flag is not set. If I recall correctly—which may be iffy given the number of RegEx flavours I've played with—if global is not set, the search will return the first instance, if it is set, it will return all instances. So in this case, returning the first line of each file would be correct if global is not set.
|
The global flags was needed for early regex use yo make it find and replace all occurrences. But for PCRE2 the engine is different and as long as you keep calling match with updated offsets, the search and replace will continue.