notesonly.in

One notebook for every subject — open it anywhere.

Log in

Regular expressions (intro)

Boolean algebra and computation basics · Mathematics

Study notes

Q: Which strings match (a|b)*abb? Test 'aabb' and 'ababa'. (a|b)*: any mix of a,b. Then literal 'abb'. 'aabb': (a|b)* = 'a', then 'abb' ✓ MATCH. 'ababa': ends 'aba', not 'abb' ✗ NO MATCH. This regex = 'strings ending in abb'!

← Back to topics for Mathematics