|
Posted by Rik on 10/02/25 11:51
McHenry wrote:
>> With listed as 'POA' you mean it literally?
>> If you're using the simple one:
>>
>> <h3>.*?(?:(?P<prices>(?:[0-9]+[0-9\.,]*)|POA).*?){1,3}</h3>
> Rik, thanks as always. POA was simply an example it could be anything.
> What I meant was if the one regex performs three caputres in the one
> statement and one fails must all three fail or can the other two still
> capture ?
<h3>.*?(?:(?P<prices>[0-9]+[0-9\.,]*).*?){0,3}</h3>
Will search for max three prices, will allow none.
<h3>.*?(?:(?P<prices>[0-9]+[0-9\.,]*).*?){1,3}</h3>
Will search for max three prices, will allow at least one.
<h3>.*?(?:(?P<prices>[0-9]+[0-9\.,]*).*?)+?</h3>
Will search for as many prices as there are, will allow at least one.
<h3>.*?(?:(?P<prices>[0-9]+[0-9\.,]*).*?)*?</h3>
Will search for as many prices as there are, will allow none.
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|