I have a block of html code in a file. I have a pattern I'm using in a very large html file. I'm looking for all text with ba and sqft However, there are entries that do not have the sqft and I'd like to capture that as 0. Also in my code it captures the ba but in the demo it doesn't.
REGEX ([0-9]+) ba<[\S\s]?>(.) sqft
demo: https://regex101.com/r/Nr6lEo/1
desire: '2, 1,596', '4, 0', '2, 2,376'
actual: '2, 1,596', '2, 2,376'