i. Accepts 'book' or 'books' using the '?' quantifier for the 's' to make it optional. ii. Accepts 'colour' or 'color' as they are written. iii. Accepts any positive integer with an optional decimal point using '\d+' for digits, '\.' for decimal point, and '\d*' for optional decimal digits. iv. Checks whether a string is an email address or not using the regex pattern for email addresses.

Interactive Regex Playground

book(s)?|colour|color|\d+\.?\d*|\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}
i. Accepts 'book' or 'books' using the '?' quantifier for the 's' to make it optional. ii. Accepts 'colour' or 'color' as they are written. iii. Accepts any positive integer with an optional decimal point using '\d+' for digits, '\.' for decimal point, and '\d*' for optional decimal digits. iv. Checks whether a string is an email address or not using the regex pattern for email addresses.
Matches
Found 0 matches

We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.