<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Regex - Vinod Sebastian - B.Tech, M.Com, PGCBM, PGCPM, PGDBIO</title>
	<atom:link href="https://vinodsebastian.com/category/it-made-easy-cat/regex-cat/feed/" rel="self" type="application/rss+xml" />
	<link>https://vinodsebastian.com</link>
	<description>Hi I&#039;m a Web Architect by Profession and an Artist by nature. I love empowering People, aligning to Processes and delivering Projects.</description>
	<lastBuildDate>Sat, 06 Dec 2025 01:25:57 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://vinodsebastian.com/wp-content/uploads/2020/12/cropped-Me-32x32.jpg</url>
	<title>Regex - Vinod Sebastian - B.Tech, M.Com, PGCBM, PGCPM, PGDBIO</title>
	<link>https://vinodsebastian.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Regex or Regular Expression</title>
		<link>https://vinodsebastian.com/regex-or-regular-expression/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=regex-or-regular-expression</link>
					<comments>https://vinodsebastian.com/regex-or-regular-expression/#respond</comments>
		
		<dc:creator><![CDATA[vinodsebastian]]></dc:creator>
		<pubDate>Tue, 22 Dec 2020 10:19:00 +0000</pubDate>
				<category><![CDATA[IT Made Easy]]></category>
		<category><![CDATA[Regex]]></category>
		<guid isPermaLink="false">https://vinodsebastian.com/general-3/</guid>

					<description><![CDATA[<p>Regex or Regular Expression What is RegEx? A RegEx, short for Regular Expression, is a powerful tool used for pattern matching within strings. It consists of a sequence of characters that define a search pattern, allowing you to search for, manipulate, and validate text based on specific criteria. Regular expressions are widely used in programming, [&#8230;]</p>
<p>The post <a href="https://vinodsebastian.com/regex-or-regular-expression/">Regex or Regular Expression</a> first appeared on <a href="https://vinodsebastian.com">Vinod Sebastian - B.Tech, M.Com, PGCBM, PGCPM, PGDBIO</a>.</p>]]></description>
										<content:encoded><![CDATA[<article>
<h1>Regex or Regular Expression</h1>

<div data-mode="normal" data-oembed="1" data-provider="youtube" id="arve-youtube-z91oxqmhbds" style="max-width:900px;" class="arve">
	<div class="arve-inner">
		<div style="aspect-ratio:500/281" class="arve-embed arve-embed--has-aspect-ratio">
			<div class="arve-ar" style="padding-top:56.200000%"></div>
			<iframe allow="accelerometer &apos;none&apos;;autoplay &apos;none&apos;;bluetooth &apos;none&apos;;browsing-topics &apos;none&apos;;camera &apos;none&apos;;clipboard-read &apos;none&apos;;clipboard-write;display-capture &apos;none&apos;;encrypted-media &apos;none&apos;;gamepad &apos;none&apos;;geolocation &apos;none&apos;;gyroscope &apos;none&apos;;hid &apos;none&apos;;identity-credentials-get &apos;none&apos;;idle-detection &apos;none&apos;;keyboard-map &apos;none&apos;;local-fonts;magnetometer &apos;none&apos;;microphone &apos;none&apos;;midi &apos;none&apos;;otp-credentials &apos;none&apos;;payment &apos;none&apos;;picture-in-picture;publickey-credentials-create &apos;none&apos;;publickey-credentials-get &apos;none&apos;;screen-wake-lock &apos;none&apos;;serial &apos;none&apos;;summarizer &apos;none&apos;;sync-xhr;usb &apos;none&apos;;web-share;window-management &apos;none&apos;;xr-spatial-tracking &apos;none&apos;;" allowfullscreen="" class="arve-iframe fitvidsignore" credentialless data-arve="arve-youtube-z91oxqmhbds" data-lenis-prevent="" data-src-no-ap="https://www.youtube-nocookie.com/embed/Z91OxQMhbds?feature=oembed&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;autohide=1&amp;playsinline=0&amp;autoplay=0" frameborder="0" height="505.8" loading="lazy" name="" referrerpolicy="strict-origin-when-cross-origin" sandbox="allow-scripts allow-same-origin allow-presentation allow-popups allow-popups-to-escape-sandbox" scrolling="no" src="https://www.youtube-nocookie.com/embed/Z91OxQMhbds?feature=oembed&#038;iv_load_policy=3&#038;modestbranding=1&#038;rel=0&#038;autohide=1&#038;playsinline=0&#038;autoplay=0" title="Regular Expression or Regex" width="900"></iframe>
			
		</div>
		
	</div>
	
	
	<script type="application/ld+json">{"@context":"http:\/\/schema.org\/","@id":"https:\/\/vinodsebastian.com\/regex-or-regular-expression\/#arve-youtube-z91oxqmhbds","type":"VideoObject","embedURL":"https:\/\/www.youtube-nocookie.com\/embed\/Z91OxQMhbds?feature=oembed&iv_load_policy=3&modestbranding=1&rel=0&autohide=1&playsinline=0&autoplay=0","name":"Regular Expression or Regex"}</script>
	
</div>
<h2>What is RegEx?</h2>
<p>A RegEx, short for Regular Expression, is a powerful tool used for pattern matching within strings. It consists of a sequence of characters that define a search pattern, allowing you to search for, manipulate, and validate text based on specific criteria.</p>
<p>Regular expressions are widely used in programming, text processing, and data validation tasks to efficiently handle complex search patterns.</p>
<h2>Key Concepts to Remember</h2>
<ul>
<li><strong>*</strong>: Matches the preceding character zero or more times.</li>
<li><strong>+</strong>: Matches the preceding character one or more times.</li>
<li><strong>?</strong>: Matches zero or one of the preceding characters.</li>
<li><strong>.</strong>: Matches any single character.</li>
<li><strong>[&#8230;]</strong>: Matches any single character inside the brackets.</li>
<li><strong>[^&#8230;]</strong>: Matches any single character not in the brackets.</li>
<li><strong>\d</strong>: Matches any digit character (equivalent to [0-9]).</li>
<li><strong>\D</strong>: Matches any non-digit character.</li>
<li><strong>\w</strong>: Matches any word character (equivalent to [a-zA-Z0-9_]).</li>
<li><strong>\W</strong>: Matches any non-word character.</li>
<li><strong>\b</strong>: Matches a word boundary.</li>
<li><strong>\s</strong>: Matches any whitespace character.</li>
<li><strong>\S</strong>: Matches any non-whitespace character.</li>
<li><strong>^</strong>: Matches the start of a line or string.</li>
<li><strong>$</strong>: Matches the end of a line or string.</li>
<li><strong>{M,N}</strong>: Matches the preceding element at least M and not more than N times.</li>
</ul>
<h3>Example Using Python</h3>
<p>Here are some basic examples of using regular expressions in Python:</p>
<pre class="EnlighterJSRAW" data-enlighter-language=""># Python code snippets for regex examples
import re

print(re.findall(&quot;.&quot;, &quot;Hello&quot;))  # Output: [&#039;H&#039;, &#039;e&#039;, &#039;l&#039;, &#039;l&#039;, &#039;o&#039;]
print(re.findall(&quot;.*&quot;, &quot;Hello&quot;))  # Output: [&#039;Hello&#039;, &#039;&#039;]</pre>
<h2>Greedy vs. Reluctant vs. Possessive Quantifiers</h2>
<p>In regular expressions, quantifiers determine the number of occurrences of a character or group in a pattern. Understanding the differences between greedy, reluctant, and possessive quantifiers is crucial for efficient pattern matching.</p>
<ul>
<li><strong>Greedy Quantifier (*):</strong> Matches as many characters as possible while still allowing the overall match to succeed.</li>
<li><strong>Reluctant Quantifier (*?):</strong> Matches as few characters as possible and still allows the match to succeed.</li>
<li><strong>Possessive Quantifier (*+):</strong> Matches as many characters as possible and does not backtrack, even if it causes the overall match to fail.</li>
</ul>
<p>Let&#8217;s see these quantifiers in action:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="">
Enter your regex: .*test // Greedy quantifier
Enter input string to search: xtestxxxxxxtest
Match: &quot;xtestxxxxxxtest&quot; from index 0 to 15.

Enter your regex: .*?test // Reluctant quantifier
Enter input string to search: xtestxxxxxxtest
Matches: &quot;xtest&quot; from index 0 to 5, &quot;xxxxxxtest&quot; from index 5 to 15.

Enter your regex: .*+test // Possessive quantifier
Enter input string to search: xtestxxxxxxtest
No match found.</pre>
<h2>A Complete Example In Python</h2>
<p>Let&#8217;s consider a more complex example where we want to extract specific patterns from a text using regular expressions in Python:</p>
<pre class="EnlighterJSRAW" data-enlighter-language=""># Python code snippet for a complete example
import re

text = &quot;This matches given regular expression in PHP.n&quot;
text += &quot;This matches given regular expression in Python.n&quot;
text += &quot;This matches given regular expression in C.n&quot;
text += &quot;This matches given regular expression in Pearl.&quot;

result = re.findall(&quot;This.* Pw{3,5}.&quot;, text)

if result:
    print(result)
else:
    print(&quot;No match&quot;)</pre>
<p>The output will be:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="">[&#039;This matches given regular expression in Python.&#039;, &#039;This matches given regular expression in Pearl.&#039;]</pre>
</article><p>The post <a href="https://vinodsebastian.com/regex-or-regular-expression/">Regex or Regular Expression</a> first appeared on <a href="https://vinodsebastian.com">Vinod Sebastian - B.Tech, M.Com, PGCBM, PGCPM, PGDBIO</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://vinodsebastian.com/regex-or-regular-expression/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
