<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Useful FlatEdit pattern examples</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : Useful FlatEdit pattern examples]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 02:59:25 +0000</pubDate>
  <lastBuildDate>Tue, 28 Oct 2008 23:39:11 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=12541</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Useful FlatEdit pattern examples : Hi JSram,I just uploaded a demo...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42439&amp;title=useful-flatedit-pattern-examples#42439</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12541<br /><strong>Posted:</strong> 28 October 2008 at 11:39pm<br /><br />Hi JSram,<br><br>I just uploaded a demo to the VB6 samples board that you might be interested in. It is code that automatically generates the required regex pattern for a user-supplied range and number of decimal places. Should be useful in a variety of situations. <br><br>Right now it only handles positive numbers, but that was enough to nearly drive me crazy :)<br><br>There may be bugs, so beware of using it in production without extensive testing.<br><br><a href="https://forum.codejock.com/forum_posts.asp?TID=12556" target="_blank">https://forum.codejock.com/forum_posts.asp?TID=12556</a><br>]]>
   </description>
   <pubDate>Tue, 28 Oct 2008 23:39:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42439&amp;title=useful-flatedit-pattern-examples#42439</guid>
  </item> 
  <item>
   <title><![CDATA[Useful FlatEdit pattern examples : Nice! Here&amp;#039;s my attempt,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42405&amp;title=useful-flatedit-pattern-examples#42405</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12541<br /><strong>Posted:</strong> 27 October 2008 at 6:55pm<br /><br />Nice! Here's my attempt, just to demonstrate a different approach. Not sure which one would be considered better.<br><br><table width="99%"><tr><td><pre class="BBcode"><br>^((&#091;1-9&#093;{0,1}&#091;1-9&#093;|1\d{0,2}|2\d{0,2}|3&#091;0-5&#093;{0,1}\d{0,1})(\.\d{1,2}|)|360)$<br></pre></td></tr></table><br><br>]]>
   </description>
   <pubDate>Mon, 27 Oct 2008 18:55:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42405&amp;title=useful-flatedit-pattern-examples#42405</guid>
  </item> 
  <item>
   <title><![CDATA[Useful FlatEdit pattern examples : yes good points and nice snippet.1.00...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42403&amp;title=useful-flatedit-pattern-examples#42403</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=787">JSram</a><br /><strong>Subject:</strong> 12541<br /><strong>Posted:</strong> 27 October 2008 at 6:28pm<br /><br />yes good points and nice snippet.<br><br>1.00 to 360<br><br><table width="99%"><tr><td><pre class="BBcode"><br>^(&#091;1-2&#093;{1}\d{0,2}(\.&#091;0-9&#093;{1,2}|)|(3{1}(&#091;0-5&#093;{0,1}\d{0,1}(\.&#091;0-9&#093;{1,2}|)|6{1}0{1})|&#091;4-9&#093;{1}\d?(\.&#091;0-9&#093;{1,2}|)))$<br></pre></td></tr></table><br><br>at least it's one way to do it, decimals allowed for 1-359 but not for 360<br><br>]]>
   </description>
   <pubDate>Mon, 27 Oct 2008 18:28:28 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42403&amp;title=useful-flatedit-pattern-examples#42403</guid>
  </item> 
  <item>
   <title><![CDATA[Useful FlatEdit pattern examples : I&amp;#039;m no Regex expert myself,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42401&amp;title=useful-flatedit-pattern-examples#42401</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12541<br /><strong>Posted:</strong> 27 October 2008 at 5:35pm<br /><br />I'm no Regex expert myself, but I will give your challenge a shot for the learning experience...<br><br>As for the cosmetic requirements, I can understand, I just thought I'd give an example that would allow any entry that evaluates to the same number. This allows you to store any entry in a database as a SINGLE/FLOAT datatype, and then restore the saved value to any format you like using the Format$ function (in case anyone else needs to do such a thing!).<br><br>On another note, one thing I recommend is to use the Pattern property at runtime and substitute the \. portions with the user's locale decimal character (in some countries it would be , instead of .). Something like this should work:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Option Explicit<br><br>Private Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long<br>Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long<br>Private Const LOCALE_SDECIMAL = &amp;HE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '&nbsp; decimal separator<br><br>Private Function DecimalCharacter() As String<br>&nbsp;&nbsp; Static s_Char As String<br>&nbsp;&nbsp; Dim l_Len As Long<br>&nbsp;&nbsp; Dim l_Locale As Long<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; If LenB(s_Char) = 0 Then<br>&nbsp; &nbsp; &nbsp; l_Locale = GetSystemDefaultLCID()<br>&nbsp; &nbsp; &nbsp; l_Len = GetLocaleInfo(l_Locale, LOCALE_SDECIMAL, s_Char, Len(s_Char))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If l_Len &lt;&gt; 0 Then<br>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; s_Char = String$(l_Len, 0)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; GetLocaleInfo l_Locale, LOCALE_SDECIMAL, s_Char, Len(s_Char)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s_Char = Left$(s_Char, InStr(1, s_Char, vbNullChar) - 1)<br>&nbsp;&nbsp; End If<br><br>&nbsp;&nbsp; DecimalCharacter = s_Char<br>End Function<br><br>Private Sub Form_Load()<br>&nbsp;&nbsp; Me.FlatEdit1.Pattern = "^((0*)1(\" &amp; DecimalCharacter &amp; "{0,1})(0*)|0*|(0*)\" &amp; DecimalCharacter &amp; "(\d{0,2}(0*)))$"<br>End Sub<br></pre></td></tr></table><br><br>]]>
   </description>
   <pubDate>Mon, 27 Oct 2008 17:35:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42401&amp;title=useful-flatedit-pattern-examples#42401</guid>
  </item> 
  <item>
   <title><![CDATA[Useful FlatEdit pattern examples : Yes that&amp;#039;s a nice example...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42400&amp;title=useful-flatedit-pattern-examples#42400</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=787">JSram</a><br /><strong>Subject:</strong> 12541<br /><strong>Posted:</strong> 27 October 2008 at 5:20pm<br /><br />Yes that's a nice example too, keep them coming&nbsp;<img src="http://forum.codejock.com/smileys/smiley8.gif" border="0" align="absmiddle"><br><br>One point regarding my integer/decimal sample is eighter enter integer soley, or add dot plus decimal part (and limit to 2 places), but not dot alone. I know it's cosmetic though but I don't like stored data like .75 or 2. as it tend to cause problem eventually somewhere down the road.<br><br>I am really a novis o expressions though and just try to improve my skills, right now I try to figure out (&gt;=1 AND &lt;=360, integers optionally with 2 decimals - anyone take the challange <img src="http://forum.codejock.com/smileys/smiley23.gif" border="0" align="absmiddle"><br><br>]]>
   </description>
   <pubDate>Mon, 27 Oct 2008 17:20:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42400&amp;title=useful-flatedit-pattern-examples#42400</guid>
  </item> 
  <item>
   <title><![CDATA[Useful FlatEdit pattern examples :  Thanks JSram...nice examples.I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42399&amp;title=useful-flatedit-pattern-examples#42399</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 12541<br /><strong>Posted:</strong> 27 October 2008 at 5:05pm<br /><br />Thanks JSram...nice examples.<br><br>I modified your last one a bit to allow any number that would Val() from 0 to 1 with a maximum of 2 decimal places &gt; 0, but any number of leading/trailing 0s.<br><br>For example, some valid entries:<br><br>1<br>1.<br>1.0<br>1.00000000000000<br>0<br>0.<br>0.000000000<br>0.01<br>0.010000000<br>00000.000000<br>00001.00000<br>.001<br><br><br>Invalid:<br><br>0.001<br>1.001<br><br><br><table width="99%"><tr><td><pre class="BBcode"><br>^((0*)1(\.{0,1})(0*)|0*|(0*)\.(\d{0,2}(0*)))$<br></pre></td></tr></table><br><br>This is useful for allowing copy &amp; paste from formatted sources, but ensuring the underlying value of the entry is within a range of values.<br><br>]]>
   </description>
   <pubDate>Mon, 27 Oct 2008 17:05:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42399&amp;title=useful-flatedit-pattern-examples#42399</guid>
  </item> 
  <item>
   <title><![CDATA[Useful FlatEdit pattern examples : Another one maching 0.01 to 1^1|(0\.(0?{1}|{1}\d?))$...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42397&amp;title=useful-flatedit-pattern-examples#42397</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=787">JSram</a><br /><strong>Subject:</strong> 12541<br /><strong>Posted:</strong> 27 October 2008 at 4:12pm<br /><br />Another one maching 0.01 to 1<br><br>^1|(0\.(0?&#091;1-9&#093;{1}|&#091;1-9&#093;{1}\d?))$<br>]]>
   </description>
   <pubDate>Mon, 27 Oct 2008 16:12:21 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42397&amp;title=useful-flatedit-pattern-examples#42397</guid>
  </item> 
  <item>
   <title><![CDATA[Useful FlatEdit pattern examples : Here is a patterns that matches...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42390&amp;title=useful-flatedit-pattern-examples#42390</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=787">JSram</a><br /><strong>Subject:</strong> 12541<br /><strong>Posted:</strong> 27 October 2008 at 12:51pm<br /><br />Here is a patterns that matches -100 to 100, 0 inclusive<br>^((-|)((1(0{2}|\d?))|(&#091;2-9&#093;\d{0,1}))|0{1})$<br><br>and same but 0 exclusive<br>^(-|)((1(0{2}|\d?))|(&#091;2-9&#093;\d{0,1}))$<br><br>There might be a more effective way to do it, by someone smarter then me but as the docs literally lacks examples (except \d*) it might be usefull to someone.<br>]]>
   </description>
   <pubDate>Mon, 27 Oct 2008 12:51:57 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42390&amp;title=useful-flatedit-pattern-examples#42390</guid>
  </item> 
  <item>
   <title><![CDATA[Useful FlatEdit pattern examples :   This pattern allow for either...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42381&amp;title=useful-flatedit-pattern-examples#42381</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=787">JSram</a><br /><strong>Subject:</strong> 12541<br /><strong>Posted:</strong> 27 October 2008 at 11:19am<br /><br />This pattern allow for either an integer value from 1 to 13 OR same int value plus a decimal 1 or 2 digits raging from .00 to .99<br><br>^(1&#091;0-3&#093;?|\d)(\.&#091;0-9&#093;{1,2}|)$<br><br><br>alternative range 1 to 19 for integer part<br><br>^(1\d?|\d)(\.&#091;0-9&#093;{1,2}|)$<br><br>note: &#091;0-9&#093; can be replaced with \d, the former is more illustrative though<br>]]>
   </description>
   <pubDate>Mon, 27 Oct 2008 11:19:52 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42381&amp;title=useful-flatedit-pattern-examples#42381</guid>
  </item> 
  <item>
   <title><![CDATA[Useful FlatEdit pattern examples :  I originally asked for help...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42378&amp;title=useful-flatedit-pattern-examples#42378</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=787">JSram</a><br /><strong>Subject:</strong> 12541<br /><strong>Posted:</strong> 27 October 2008 at 11:01am<br /><br />I originally asked for help with a pattern in this threed as the docs just have one simple example. I finally figured it out and thought of keeping this treed instead as something of a collection of usefull patterns, so feel free to add your own.<br>]]>
   </description>
   <pubDate>Mon, 27 Oct 2008 11:01:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=12541&amp;PID=42378&amp;title=useful-flatedit-pattern-examples#42378</guid>
  </item> 
 </channel>
</rss>