<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Regex on Wapnet Blog</title><link>https://blog.wapnet.nl/tag/regex/</link><description>Recent content in Regex on Wapnet Blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Wed, 24 Aug 2011 10:06:22 +0000</lastBuildDate><atom:link href="https://blog.wapnet.nl/tag/regex/feed.xml" rel="self" type="application/rss+xml"/><item><title>Regular Expressions Example</title><link>https://blog.wapnet.nl/2011/08/regular-expressions-example/</link><pubDate>Wed, 24 Aug 2011 10:06:22 +0000</pubDate><guid isPermaLink="false">https://blog.wapnet.nl/?p=522</guid><description>&lt;p&gt;If you want to use regular expressions to know if some numerical value is higher then 199 use the following code:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;^\d{1,2}$|^[1]\d\d$&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Explanation:&lt;/p&gt;
&lt;p&gt;^          = String begins with&lt;/p&gt;
&lt;p&gt;\d         = numerical string (character 0-9)&lt;/p&gt;
&lt;p&gt;{1,2}    = minimal 1 maximum 2 numerical characters&lt;/p&gt;
&lt;p&gt;$          = end script&lt;/p&gt;
&lt;p&gt;|           = OR (to bind 2 regular expressions)&lt;/p&gt;
&lt;p&gt;^          = begins with&lt;/p&gt;
&lt;p&gt;[1]        = first character = 1 (if you want to go till 299 it may be [1-2])&lt;/p&gt;</description></item></channel></rss>