Hello @abil02 ,
for the first question, there is no difference between the two representations.
For the second question:
The original expression had the wordBoundary for each regex already /\b[a-z]+[0-9]*\b|\b[a-z]*[0-9]+\b/
I can build that expression without duplicating the \b for each half using grouping. but that would have made the expression look a little bit more complicated unnecessarily.
Apple’s refactor tool just converts things as they are.
With RegexBuilder, you can control the grouping a little easier by moving the wordBoundary outside of the ChoiceOf which what is expressed in the book and it actually mentions that:
This time, the wordBoundary is present outside of the or operator ChoiceOf . You can control the groupings that fall within the ChoiceOf block.