Hi,
Input file:
-13-
-1er-
-1xyz1-
-1xz12-
-2ab1-
-2ab2--
-143-
Code:
grep '^[\-][0-9][a-z]*[0-9]\-' input.txt
Wrong output:
-13-
-1xyz1-
-2ab1-
-2ab2--
Expected output:
-1xyz1-
-2ab1-
This is what i am trying to do:
1)starts with - as first one
2) second character any number
3) third one any letter a to z
4) penultimate char - any number
5) last one is with -
Thanks in advance .