[ad_1]
First regex: String with foObar, foobBar should match but not fOobar, foobbar
Second regex: String with fOobar, fooBbar should match but not foObar, foobbar
Third regex: should match both – foObar, fOobar, fooBbar, foobBar
For first regex I tried the following without success:
sed -nE '/([a-z])\U\1/p' <<<foObar
[ad_2]