I have a list that contains the names of hosts available in our company.
For example :
- gswast03
- gkjbossp1
- frdwop04
The last characters t, p, q before the number represent the environment of the host. All strings end with a number.
- t
tfor test - p
pfor prod - q
qfor qas
I need a reqular expression to obtain the character that is leading to number at the and of the host name (I need a solution for a single string not all list in a file)
For example :
gswast03
In this string, I just want to extract tt character.
Thank you in advance.