If you're looking to use regular expressions (regex) to check if a specific character is present in a string, you can use the following pattern in most programming languages: the ? quantifier makes the preceding character optional.
If you want to select instances of the word "test" or "testa" where the presence of 'a' is conditional, you can use the following regex pattern:
Source code viewer
testa?Programming Language: PCRE