Alibabacloud.com offers a wide variety of articles about mastering regular expressions by jeffrey friedl, easily find your mastering regular expressions by jeffrey friedl information here online.
Mastering Regular Expressions
This book by jerffrey E. F. Friedl has been famous for a long time. I purchased a copy from Dangdang in December, but I have never had time to read it. The main reason is, of course, English is poor, and I have not developed the habit and ability to read English.
Sorry, why didn't I spend
about in a few words about the Scala extractor, this section simply shows how the extractor has been used with regular expressions in Scala.Extract matching IP address sub-segments:object RegexMatch { def main(args: Array[String]): Unit = { val ipRegex="(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)".r for(ipRegex(one,two,three,four) "192.168.1.1")) { println("IP子段1:"+one) println("IP子段2:"+two)
it appears: Match t_adbc ( ' _ ' does not exist in the word, it represents the location of the match match TADCNBSP; a (? =ad) match NBSP, TAADCNBSP; TADC (? ... Positive Reverse view (right-to-left viewing text) indicates the post-location of the matched content, such as (? get where ' ab ' appears: Match tad_bc (' _ ' does not exist in the word, it represents the location of the match )(?! ... ) Negative order Surround(? ... ) negative reverse-order surround\ t tab\s Blank\s a
I. Problems
Use commas (,) to separate a numeric string from the right to the left. For example, replace "123456789" with "123,456,789 ".Ii. Analysis
In essence, the replacement algorithm groups strings from the right to the left, with each 3 characters in a group, and then inserts a comma between the group and the group.Iii. Syntax
Regular Expressions introduce the concepts of "prediction" and "review". Th
Body
At the beginning of a more careful study of regular expressions, is still relatively exciting, because the work of the use of a lot of things. You can use regular expressions instead of a lot of hand-made things in the later sections. The combination of Python believes that there can be a lot of harvest today is
Want to learn and proficient regular expression can go to see, start easier to understand, after a bit difficult, later have time to look back, worth repeated deliberation.The 7th chapter, since it involves the use of regular expressions in the main programming language language, is not read.--December 23, 2016 read "Proficient
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.