Match any character: dot (.)

Source: Internet
Author: User

-- Start

Assume that you want to end the English periods (.(.), Is it easy, huh, in emeditorCTRL + HCall upReplace
Dialog box, inFindEnter an English period (.) inReplaceEnter Chinese periods (.), ClickReplace al lThat's it. We pressCTRL + zUndo the replacement we just replaced, and then selectReplaceIn the dialog boxUse Regular ExpressionsAgain, click it elegantly.Replace
Al l
A miracle occurs. All the words in the file are replaced with periods. This is not what we want. Why is this happening? Because the dot (.) has special meaning in a regular expression, it can represent any character. We call a character with special significance in a regular expression like a dotMetacharacter)The Fuzzy Matching capability of regular expressions is achieved only when they are available.

Congratulations, you have learned the first metacharacter. We will add it to our toolbox. Don't worry. You will soon learn more metacharacters, by then you will reach a new height.

Metacharacters Name Matching object
. Dot) Any character

---For more information, see:Regular Expressions
--Shengming: reprinted, please indicate the source
-- Last updated on 2012-04-21
-- Written by shangbo on 2012-04-18
-- End

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.