Here is a sample of data am working at, which consists of two columns V1 and V2
V1 V2
1 A415Z A415Z 1.010
2 A415J A415Z 0.960
3 B416X A415Z 0.980
4 B416Z A415Z 0.990
5 B416J A415Z 1.020
6 B416M A415Z 1.085
7 B416P A415Z 6.380
8 B416W A415Z 0.995
9 D420R A415Z 0.995
10 D420H A415Z 0.975
11 B416X B416X 0.950
12 B416Z B416X 0.960
13 B416J B416X 0.990
14 B416M B416X 1.055
In the first column "V1" , I want to remove the rows which have the two words start with the same character. For example : In the first , second and last four rows the elements are: A415Z A415Z, A415J A415Z, B416X B416X, B416Z B416X , B416J B416X, B416M B416X. so the output should look like the one given below.
V1 V2
1 B416X A415Z 0.980
2 B416Z A415Z 0.990
3 B416J A415Z 1.020
4 B416M A415Z 1.085
5 B416P A415Z 6.380
6 B416W A415Z 0.995
7 D420R A415Z 0.995
8 D420H A415Z 0.975
How can I make use of a regular expressions here? (or) if there is better method suggestions will be helpful.