Regex Help

Hello EE,

I have a huge text file and I need get only the strings where :

Always some letters at the beginning (but never numbers), then always  the character   :   then always some letters and/or numbers

so something like this would work:

abcd: test1234

that wouldnt work :
April 24, 1946: abcd1

that wouldnt work:

can you help? thanks!
Who is Participating?
ozoConnect With a Mentor Commented:
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
I'll assume the characters following the colon are arbitrary, then this regex should work:  '[a-zA-Z]+:.*[a-zA-Z0-9]+'
n2fcConnect With a Mentor Commented:
Might not be the best...
But this works:


You can try it out here:

or here:
PhilippeRenaudAuthor Commented:
sorry for delay guys..thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.