In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about how to understand the regular expressions of Python, which may not be well understood by many people. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
Python regular expressions!
There are also Python tutorials on regular expressions shared with you, but some partners say they are still not fully absorbed!
These are normal. Is regular expression difficult? It must be hard! You can't fully master what you've learned in one tutorial!
If you don't find regular expressions difficult to read and write, either you are a genius or you are not from Earth. The syntax of regular expressions is a headache, even for people who use it a lot, including me, of course.
Because regular expressions are also a powerful tool for me to write Python crawlers. No matter how big and messy the content is, even if it is looking for a needle in a haystack, as long as you tell me what the needle looks like, I can get it out of the vast sea.
As for how I learned it, of course, from the beginning of the exercise, to the back of the continuous practical practice! (key point! )
Here to recommend a few sharp tools and websites for learning regular expressions, there are tutorials with you, and the rest is up to you to complete.
First: if you don't know what a regular expression is, but you want to use it. You can get started quickly from here.
Second: the syntax of regular expressions, which is a regular syntax graph that can be used for fast queries. You don't have to memorize it, you'll check it when you use it.
Third: of course, it is faster to write with tools. Because regular expressions are difficult to read and write and are prone to errors, we'd better have a tool to test regular expressions online.
1.Regexr
(https://regexr.com/)
2.Regx101
(https://regex101.com/
Support for multiple languages, prec,php,java,python,golang
The interface is beautiful and generous
Support error prompts and real-time matching
3. Regulex
(https://jex.im/regulex/)
Real-time drawing based on regular expressions
Page loading speed is fast
Fourth: doing exercises, there are a series of regular expression questions on HackerRank. You don't have to do much, just do a few. When you're done, you should almost be able to master the use of regular expressions.
Learn Python regular expression step by step, do not want to step up the sky, learn one day, learn once I can master, we are not geniuses, programmers are a profession that needs continuous learning and exercise, if you do not understand the basic concepts to start doing exercises, writing code, it will only make your code more complex. What is solid, such as: from a typical example, remove the white space at the beginning and end of a string, try to test it with 5-10 different rules, and think about which ways are the most efficient and why? Remember that every programmer realizes it step by step over and over again in order to really master the regularity, and so is the technology bull, and there is no exception!
After reading the above, do you have any further understanding of how to understand the regular expressions of Python? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.