官术网_书友最值得收藏!

Introduction to regular expressions

Regular expression (or in short regex) is a very useful tool that is used to describe a search pattern for matching the text. Regex is nothing but a sequence of some characters that defines a search pattern. Regex is used for parsing, filtering, validating, and extracting meaningful information from large text, such as logs and output generated from other programs.

We find regular expressions in day-to-day use on many websites. For example, while searching for your favorite recipe on search engines, while filling up forms and entering data such as username and passwords, and so on. While setting up a password on many sites, we encounter password validation errors, such as password must contain one digit or at least one uppercase letter or at least one special character, and so on. All these checks can be done using regular expressions. A few more typical examples of regular expressions are validating phone numbers or validating postal/zip/pin codes.

主站蜘蛛池模板: 腾冲县| 北海市| 保靖县| 若羌县| 澳门| 高雄市| 理塘县| 大理市| 夏津县| 榆中县| 景德镇市| 邵东县| 巴东县| 石首市| 庄浪县| 洞口县| 马尔康县| 金昌市| 密云县| 海盐县| 泰来县| 青浦区| 浪卡子县| 元朗区| 岳普湖县| 黑水县| 西畴县| 二手房| 凌源市| 青冈县| 繁昌县| 德庆县| 夏河县| 天气| 吐鲁番市| 长宁县| 屯昌县| 丰顺县| 桑植县| 三门峡市| 尉氏县|