Reputation: 2509
I want to get following information from given text
Mohsan,Hasan ADDRESS 123-456789
ABCD,EFGHIJKL ADDRESS 123-456789
AB,XYZFGH ADDRESS 123-456789
Get lines which have first name of 3-5 characters and last name of exact 5 characters
Upvotes: 0
Views: 66
Reputation: 43663
Use regex pattern
^[a-zA-Z]{3,5},[a-zA-Z]{5}\s
or in some environments/programming languages
^[a-zA-Z]{3,5},[a-zA-Z]{5}\\s
Upvotes: 2