Let's say I have
1 ABC Street
1 A ABC Street
With \d
, it matches 1 (what I expect), with \d \w
, it matches 1 A (expected). When I combine the patterns together \d|\d \w
, it matches only the first one but ignores the second one.
My question is how to use "or" condition correctly in this particular case?
PS: The condition is wrapping the number only when there is no single letter after that, otherwise wrap the number and the single letter.
Example: 1 ABC Street match number 1 only, but when 1 A ABC Street wrap the 1 A