(o[^o]*)(o) --> stand for looking for two part (o[^o]*) and (o). first part , o means 'o' , [^o] means any character which is not 'o' , * means match [^o] zero or more times. second part is easy ,just match 'o' . Put it all together is looking for a string which have two 'o' . \1\U\2 --> \1 means the first matched part (o[^o]*) \U means upper case the following character \2 means the second matched part (o)
For Example:
the first looking is
own fo The first part is (own f) ,the second part is (o) , \U will uppercase the second part (o) , so the result is 'own fO'
the second looking is as the same:
over the lazy do The first part is (over the lazy d) ,the second part is (o) , \U will uppercase the second part (o) , so the result is 'over the lazy dO'
... View more