I understand the code and changed it a bit to make it even clearer, but I do not have a clear practical application !? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 13

I understand the code and changed it a bit to make it even clearer, but I do not have a clear practical application !?

https://code.sololearn.com/cnTh61yQ7HUM/?ref=app

24th Mar 2018, 11:19 PM
Vučko/Вучко/Vuchko
Vučko/Вучко/Vuchko - avatar
3 Answers
+ 7
10th string - there is small 't' letter in the string so it matches, too. (think it wasn't planned) I can't imagine practical application of single [^A-Z], too. But you can use lots of differen patterns. It might be useful to check if user's unput is correct format. For example checking if the string is email: ^[a-z_.]{4, 18}@[a-z]{2, 13} \.[a-z]{2, 8}$ #nearly like or correct format of telephone number, like ^(?: 8|+7)(?:705|777|707)[0-7]{7}$ for my country.
25th Mar 2018, 9:51 AM
Alice Laniakea
Alice Laniakea - avatar
+ 3
What do you mean? Are you not sure when you’ll actually use it? I recently used it for web scraping from IMDB
24th Mar 2018, 11:23 PM
Ariela
Ariela - avatar
+ 3
Here is an example for a practical application for a regex: https://code.sololearn.com/cnbUBK5uKvnG/?ref=app
5th May 2018, 9:41 AM
Johannes
Johannes - avatar