Regex Linking Examples: 5

Case 5: Finding all words that start with 'a' or 'A' in a string

This is a regex that finds all words that start with either 'a' or 'A' in a string. It's a great way to find all words that are awesome or, you know, just plain 'A'.

Regex Pattern: /[aA]\w+/

Example Input: "Hello, World! Aardvark and Aroma are awesome animals."

Matches: Aardvark, Aroma

Learn more about finding all words that start with 'b' or 'B' in a string