How to pick both upper case and lower case using regex

effective: 3/09/2018
EFFECTIVE: 3/08/2018
if need both date values using single regex for both upper and lower case effective

1 Like

For the text you gave above @vivekktr

This will work :slight_smile:

(?<= ).+

1 Like

Try with this buddy
[^a-zA-Z\S].*
and it worked as well
image
image

Cheers @vivekktr

2 Likes

The above posts are fine, but I think you really need the IgnoreCase option:

pattern = "(?<=(effective: )).*"
text = EFFECTIVE: 3/08/2018
dateStr = System.Text.RegularExpressions.Regex.Match(text, pattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase).Value.Trim

Regards

1 Like