Regex: How many strings start with letters and end with numbers? -
i'm trying write regex expression searches through text file bunch of names, phone numbers, emails, , garbage, find how many strings start letters , end numbers? line line searching.
any help? know needs start believe. thanks.
/^[a-z]
here test using code provided 1 of you.
^[a-za-z]+.*[0-9]+$
here explanation: ^ .. @ start of paragraph
[a-za-z]+ .. letter occurs @ least once, then
.* .. character except line break or paragraph break occurs 0 n times
[0-9]+ .. there @ least 1 number
$ .. @ end of paragraph
you can use online regex testing tool check if regex correct: http://www.myregextester.com/index.php
and here list of regex expressions: https://help.libreoffice.org/common/list_of_regular_expressions
Comments
Post a Comment