I have a data one on each line in a file as below
BMT.PQ
DMZ.IV
VLD.Q
WPS.T
I am looking for a regex to split out into two categories of output
One where starting letter of the data is between A
to M
and other
where starting letter of the data is from N
to Z
I tried this
[A-M].*
for getting first half of data with first beginning letter from A
to M
and i was expecting a result/regex text match of
only :
BMT.PQ
DMZ.PQ
but it also gave a match for
LD.Q
which was incorrect for me.
I even unsuccessfully tried [(A-M)(A-M)(A-M)].*
Basically i want to split based on starting letter in the data. One half for data beginning with letters from A
to M
and second half for data beginning with letter N
to Z
.