group() and group(1) return, and where in-style searching goes wrong. Click a special character to insert it, or start from a pattern from class.re.search finds only the first match and returns a match object or None. re.sub replaces every match. Click the red r to switch the raw string off and see what happens to \b.
Built to accompany COSC 1210 (CS I, Python), lecture “Why do you need a break?” (strings II). The matching runs live in your browser with JavaScript's regular expressions, which behave like Python's re for every special character used here: | ^ $ ? . * ( ) \b. Check anything else in Python itself.