<?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>Oracle of ONE1 &#187; regex</title>
	<atom:link href="http://dvector.com/oracle/tag/regex/feed/" rel="self" type="application/rss+xml" />
	<link>http://dvector.com/oracle</link>
	<description>Obscure words of unity</description>
	<lastBuildDate>Wed, 31 Aug 2011 21:25:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Regular Expressions in cformsII</title>
		<link>http://dvector.com/oracle/2008/05/13/regular-expressions-in-cformsii/</link>
		<comments>http://dvector.com/oracle/2008/05/13/regular-expressions-in-cformsii/#comments</comments>
		<pubDate>Tue, 13 May 2008 19:23:41 +0000</pubDate>
		<dc:creator>oracle</dc:creator>
				<category><![CDATA[dvector]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[dvector support]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://dvector.com/oracle/2008/05/13/regular-expressions-in-cformsii/</guid>
		<description><![CDATA[dVector.com provides the plugin cformsII for forms. This is a powerful and flexible plugin. In advanced verification of visitor submitted data, regular expressions are often used. See cformsII help especially the &#8216;Using regular expressions with form fields&#8217;.
In the dVector installation, there seems to be a small implementation issue. cformsII strips out single &#8216;\&#8217;s in the [...]]]></description>
			<content:encoded><![CDATA[<p>dVector.com provides the plugin <a href="http://www.deliciousdays.com/cforms-plugin">cformsII</a> for forms. This is a powerful and flexible plugin. In advanced verification of visitor submitted data, regular expressions are often used. See cformsII help especially the &#8216;Using regular expressions with form fields&#8217;.</p>
<p><span id="more-23"></span>In the dVector installation, there seems to be a small implementation issue. cformsII strips out single &#8216;\&#8217;s in the regular expression. To fix this problem simply place two &#8216;\&#8217;s instead of one in your regular expression. Unfortunately, every time you update settings, the &#8216;\&#8217;s are stripped. This means that if you use regular expressions in your form fields, you must double the slashes just before your last Update Settings.</p>
<p>Here are some regular expressions I use:</p>
<pre>Telephone||^\([0-9]{3}\)\s?[0-9]{3}(-|\s)?[0-9]{4}$|^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$</pre>
<pre>Zip Code||^[0-9]{5}([- /]?[0-9]{4})?$</pre>
<pre>Website||^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$</pre>
<pre>Name||^[a-zA-Z][a-zA-Z',\.\- ]*[a-zA-Z\.]$</pre>
<p>The same regular expressions only with doubled slashes:</p>
<pre>Telephone||^\\([0-9]{3}\\)\\s?[0-9]{3}(-|\\s)?[0-9]{4}$|^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$</pre>
<pre>Zip Code||^[0-9]{5}([- /]?[0-9]{4})?$</pre>
<pre>Website||^([a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,6}$</pre>
<pre>Name||^[a-zA-Z][a-zA-Z',\\.\\- ]*[a-zA-Z\\.]$</pre>
<p>This is a bit of an inconvenience but once you have set your forms, there is usually very little reason to change them.</p>
<p>While the use of regular expressions does not eliminate invalid data, it certainly does cut down on erroneous user input. The <a title="Regular Expression Library" href="http://regexlib.com/DisplayPatterns.aspx">Regular Expression Library</a> provides an excellent resource for those simply looking for regular expression recipes.</p>
]]></content:encoded>
			<wfw:commentRss>http://dvector.com/oracle/2008/05/13/regular-expressions-in-cformsii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

