What is a Regular Expression or RegEx or RegExp ?
A regular expression is a special text string for describing a search pattern. Regular expressions are used in search engines, search and replace dialogs of word processors and text editors. Many programming languages provide regex capabilities, built-in, or via libraries.
The phrase regular expressions is often used to mean the specific, standard textual syntax for representing patterns that matching text need to conform to. Each character in a regular expression (that is, each character in the string describing its pattern) is understood to be a metacharacter (with its special meaning), or a regular character (with its literal meaning).
abc…
|
Letters
|
|
123…
|
Digits
|
|
\d
|
Any Digit
|
|
\D
|
Any Non-digit character
|
|
.
|
Any Character
|
|
\.
|
Period
|
|
[abc]
|
Only a, b, or c
|
|
[^abc]
|
Not a, b, nor c
|
|
[a-z]
|
Characters a to z
|
|
[0-9]
|
Numbers 0 to 9
|
|
\w
|
Any Alphanumeric character
|
|
\W
|
Any Non-alphanumeric character
|
|
{m}
|
m Repetitions
|
|
{m,n}
|
m to n Repetitions
|
|
*
|
Zero or more repetitions
|
|
+
|
One or more repetitions
|
|
Optional character
|
||
\s
|
Any Whitespace
|
|
\S
|
Any Non-whitespace character
|
|
^…$
|
Starts and ends
|
|
(…)
|
Capture Group
|
|
(a(bc))
|
Capture Sub-group
|
|
(.*)
|
Capture all
|
|
(abc|def)
|
Matches abc or def
|
The Dot ( . ) - Any character
The dot ( . ) represents any character.
The ' .* ' matches zero or more of any character.
Here the ' . ' matches only a single character.
Here the ' .. ' matches only a two characters.
Here the searching of 'th' characters.
Range
Matches a character having a character code between the two specified characters inclusive.
Range of digits
Range of small alphabets
Range of capital alphabets
Range of digits, small alphabets, capital alphabets
Range with Repetitions {m}
Range with zero or more Repetitions ' * '
Negated set [^ ]
Match any character that is not in the set.
Plus ( + )
Matches 1 or more of the preceding token.
Alternation ( | ) and Optional ( ? )
Acts like a boolean OR. Matches the expression before or after the
|
.
Optional matches 0 or 1 of the preceding token, effectively making it optional.
Optional ( ? )
Quantifier {m,n}
Matches the specified quantity of the previous token.
{1,2}
will match 1 to 2.
Anchors ( ^ $ )
' ^ ' matches the beginning of the string, or the beginning of a line.
' $ ' matches the end of the string, or the end of a line.
Regular expression for email id
To detect the below string:- 200 6248 Regular Expression is [0-9]{3}\s[0-9]{4}
{3} -> 3 times digit
\s -> space character
To detect the below string:- 123.123.123.123 Regular Expression is [0-9]{3}\.[0-9]{3}\.[0-9]{3}\.[0-9]{3}
{3} -> 3 times digit
\. -> Escape Dot (.) seperator
To detect the below string:- [26/Apr/2000:00:23:48 -0400] Regular Expression is \[[0-9]{2}\W[A-Za-z]{3}\W[0-9]{4}\:[0-9]{2}\:[0-9]{2}\:[0-9]{2}\s\-[0-9]{4}\]
{4} ->4 times digit
\[ -> Escape charactor ' [ '
\] -> Escape charactor ' ] '
\: -> Escape charactor ' : '
\W -> Escape special charactor
Wow easy to understand.Good
ReplyDeleteRegular Expression Or Regex Or Regexp >>>>> Download Now
Delete>>>>> Download Full
Regular Expression Or Regex Or Regexp >>>>> Download LINK
>>>>> Download Now
Regular Expression Or Regex Or Regexp >>>>> Download Full
>>>>> Download LINK OV
Good job buddy ....
ReplyDeletegot a perfect view of regex,helpful to me
ReplyDeletethank you.
nice very useful article thank you for sharing.
ReplyDeleteHadoop Tutorials
Excellent Blog very imperative good content, this article is useful to beginners and real time
ReplyDeleteemployees.Thank u for sharing...
Hadoop Training in Hyderabad
Nice.very useful information .Thank you for sharing big data hadoop online training
ReplyDeletethank you for sharing such a good and useful information, please keep on share like this
ReplyDeletehadoop training in hyderabad
hadoop online training
hadoop training in ameerpet
Really nice blog post.provided a helpful information.I hope that you will post more updates like thisBig data hadoop online Training India
ReplyDeletehadoop training in bangalore
ReplyDeleteThe blog is so interactive and Informative , i Request you to write more blogs like thisHadoop Admin Online course
ReplyDeleteReally nice blog post.provided a helpful information.I hope that you will post more updates like thisBig Data Hadoop Online Training Hyderabad
ReplyDeleteIt is really a great work and the way in which you are sharing the knowledge is excellent.
ReplyDeletebig data analytics company in hyderabad
Thank you for this awesome blog. You are giving a professional touch to your content. It makes your article worth reading. Looking forward to learn more from you.
ReplyDeleteSpark Training in Chennai
Spark Training Academy Chennai
Tally Course in Chennai
Tally Training in Chennai
IoT Training in Chennai
IoT Courses in Chennai
Spark Training in T Nagar
Spark Training in OMR
very nice blog...I will definitely follow your blog in future
ReplyDeleteHadoop Online Training
Hadoop Training in Hyderabad
valueble information thank you
ReplyDeleteSpark and Scala Online Training
APTRON Gurgaon teach you everything about Hadoop right from the earliest starting point to the very advanced level so you can be efficient with your work in challenging situations.
ReplyDeleteFor More Info: Hadoop Course in Gurgaon
Good blog
ReplyDeleteSpark and Scala Online Training
world777 official
ReplyDeletebest property to buy in jaipur
class 12 tuition classes in gurgaon
kurti skirt set
black printed sarees
azure firewall
azure blueprints
azure resource group
azure application gateway
azure express route
Regular Expression Or Regex Or Regexp >>>>> Download Now
ReplyDelete>>>>> Download Full
Regular Expression Or Regex Or Regexp >>>>> Download LINK
>>>>> Download Now
Regular Expression Or Regex Or Regexp >>>>> Download Full
>>>>> Download LINK fH
smm panel
ReplyDeletesmm panel
iş ilanları
İnstagram takipçi satın al
hirdavatciburada.com
beyazesyateknikservisi.com.tr
SERVİS
Tiktok hile
Thank you for sharing such an informative post.
ReplyDeleteI am Cindy jones. I am Completing my B.pharm and M.Pharm for USA university. Currently, I am working at Mygenmeds pharmacy. Our pharmacy sells All ED Medicine at an affordable price. Mygenmeds is the best website for buying generic pills online. Most effective pills for Ed - Tadalista 20 | Cenforce 120 | Vidalista 40
Cryptocurrency App Development Company is a subset of digital currency designed to serve as an exchange mechanism for secure online transactions via cryptography. Bitcoin is the world's first decentralized record currency. It has been a huge success, with a good response from the global community. It has prepared the path for the emergence of new cryptocurrencies. These digital currencies are also known as Bitcoin forks.
ReplyDeleteA Dedicated Server is a physical server that's assigned to a single organization.
ReplyDelete