I need to build one RegEx to remove leading "The" or "A" or "An" and "spaces" from a given string.
For example, the given string is:
The quick brown fox jumps over the lazy dog
With Regex I want the leading "The" to be removed and return just
quick brown fox jumps over the lazy dog
I tried (added from a comment)
^*(?<=[The|An|A]\s){1}.*
It is working fine but in one scenario it is not returning expected result. Please see the scenarios below.
Input: The quick brown fox --> Result = quick brown fox
Input: A quick brown fox --> Result = quick brown fox
Input: In A sunny day --> Result = A sunny day (expected is In a sunny day.. as the string is not starting with A)
Input: American An bank --> Result = An bank (expected is American An bank.. as the string is not starting with An)