Hi ! I was curious about something, for the regular expression r"\be[-\s]?mail" I have a question.
What does the “\be” at the begining of the expression do ?
I understand that \b represents a backspace, but I dont see what that would do in this case.
Hi @cdchavezq. The \b part actually stands for a word boundary and not a backspace. I’m copying this from RegExr: “Matches a word boundary position between a word character and non-word character or position (start / end of string).” So having it there before e means that it wouldn’t include a string like “late mail” because the “e” is part of another word and not the beginning of one. I hope that makes sense.