Regular Expression

Pattern

Input


	
			

Descriptions of Patterns

[a-z._0-9]+@gmail.com : End of sentence should end with "@ gmail.com". May contain lowercase, ".", and "_".

[[0-2][0-9]|3[0-1]][.][0-9]{2}[.][0-9]{4} : If the day part is between 0-29 : [0-2] [0-9], if it is 30 or 31 : 3[0-1]. Divided by day and month with dots [.]. The month is composed of 2 digits 0-9 : [0-9]{2}. Divided by year point with the moon [.]. The year is composed of 4 digits 0-9 : [0-9]{4}.

[a-z] : Find all lowercase letters in the alphabet.

[0-9]{4} : Find four of the numbers from 0 to 9, along with four.

d[iuü][km] : Find d letter, one of the letters i or ü or u, one of the letters k or m, that come one after another.

x[a-z] : Finds the lowercase letter after x and x.

What is Regex

Short for regular expression, a regex is a string of text that allows you to create patterns that help match, locate, and manage text. Perl is a great example of a programming language that utilizes regular expressions. However, its only one of the many places you can find regular expressions. Regular expressions can also be used from the command line and in text editors to find text within a file.

When first trying to understand regular expressions it seems as if it is a different language. However, mastering regular expressions can save you thousands of hours if you work with text or need to parse large amounts of data.

Where to use

Many programming languages, operating system commands, database queries and search applications uses Regular Expression. We are going to use it on HTML inputs for specifical input type like Social ID, phone number, email, credit card number and validation date etc.

How to Use


A regular expression pattern is composed of simple characters, such as /abc/, or a combination of simple and special characters, such as /ab*c/ or /Chapter (\d+)\.\d*/. The last example includes parentheses which are used as a memory device. The match made with this part of the pattern is remembered for later use.


Watch videos for more info . .

Copyright © 2019 Tema - Designed by Feyza Nur SAKA