I'm trying to select text for Dolby Digital channels, abbreviated DD, DDP, DD+, etc.
The problem I have is if the element already starts with 5.1 or 5, (decimal or int), I don't want it to select any numbers after it, because it could accidentally select numbers that are part of a different element.
https://regex101.com/r/MNq3Mw/2
Regex
\b\040?(\d[.]?\d?\040?)?(DDP|DD\+?\s?)([. ]?\040?\d[.]?\d?)?\b
I'm using \040 as whitespace, but I'd rather use \s, but it's selecting multiple lines.
I've tried lookahead and lookbehinds with no success.
Want All Selected
DDP 5.1
DD+ 5.1
DD 5.1
DDP5.1
DD+5.1
DD5.1
Want All Selected
5.1 DDP
5.1 DD+
5.1 DD
5.1DDP
5.1DD+
5.1DD
Don't want the 5.1 ending selected
5.1 DDP 5.1
5.1 DD+ 5.1
5.1 DD 5.1
5.1DDP5.1
5.1DD+5.1
5.1DD5.1
Don't want the ending single number 5 selected
5.1 DDP 5
5.1 DD+ 5
5.1 DD 5
5.1DDP5
5.1DD+5
5.1DD5