I have one requirement to delete all lines from a file if it matches below scenario. File contains three column. Employee Number, Employee Name and Employee ID
Scenario is: delete all line if Employee Number (1st column) contains below
- Non-numeric Employee Number
- Employee Number that are over 99999 (data length is over 5 characters)
- Employee Number that have any alpha characters
At present my file looks like as below
0000-|John T|johnT
4906790742|amit kumar|akumar
SM36950SE2|Mike henry|mhenry1
03942|ronald F|ronaldf
36152|anshu ran|aran2
C0490|micheal z|michael3
I want my file should look like
03942|ronald F|ronaldf
36152|anshu ran|aran2
I need your assistance and guidance on this.