<?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>NewSourceMedia Blog &#187; text</title>
	<atom:link href="http://newsourcemedia.com/blog/tag/text/feed/" rel="self" type="application/rss+xml" />
	<link>http://newsourcemedia.com/blog</link>
	<description>Focused on Interactive Design, Development and Marketing</description>
	<lastBuildDate>Fri, 30 Dec 2011 04:30:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>CSS Shadow Text Effects</title>
		<link>http://newsourcemedia.com/blog/css-shadow-text-effects/</link>
		<comments>http://newsourcemedia.com/blog/css-shadow-text-effects/#comments</comments>
		<pubDate>Fri, 29 Dec 2006 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[shadow]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2006/12/28/css-shadow-text-effects/</guid>
		<description><![CDATA[Add cool shadows effects to your text using css codes Add cool shadows effects to your text using css codes to make the text more readable. Here is an example of light blue text with dark soft shadow. &#60;style type="text/css"&#62; &#8230; <a href="http://newsourcemedia.com/blog/css-shadow-text-effects/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Add cool shadows effects to your text using css codes
<span id="more-174"></span>

Add cool shadows effects to your text using css codes to make the text more readable. Here is an example of light blue text with dark soft shadow.

<code> &lt;style type="text/css"&gt;</code>

h3 {color: #BDD6FF; text-shadow: black 0.1em 0.1em 0.2em}

&lt;/style&gt;]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/css-shadow-text-effects/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript Non Alphanumeric Characters Regex</title>
		<link>http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/</link>
		<comments>http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/#comments</comments>
		<pubDate>Fri, 29 Dec 2006 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Javascripts]]></category>
		<category><![CDATA[JS Forms]]></category>
		<category><![CDATA[alph]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[alphabetic]]></category>
		<category><![CDATA[alphanumeric]]></category>
		<category><![CDATA[alphnumeric]]></category>
		<category><![CDATA[and]]></category>
		<category><![CDATA[hyper]]></category>
		<category><![CDATA[hypertext]]></category>
		<category><![CDATA[javascript examples]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[letters]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[numeral]]></category>
		<category><![CDATA[numeric]]></category>
		<category><![CDATA[only]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2006/12/28/javascript-non-alphanumeric-characters-regex/</guid>
		<description><![CDATA[Using javascript regular expressions to stop users from entering non-aphanumeric characters or white spaces Say you want to stop users from entering non-aphanumeric characters or white spaces. Using regular expressions would be the easiest method: Here is my javascript code: &#8230; <a href="http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Using javascript regular expressions to stop users from entering non-aphanumeric characters or white spaces
<span id="more-175"></span>

Say you want to stop users from entering non-aphanumeric characters or white   spaces.

Using regular expressions would be the easiest method:

Here is my javascript code:

<code>&lt;script language="Javascript"&gt;
function alphaNumericCheck(){
var regex=/^[0-9A-Za-z]+$/; //^[a-zA-z]+$/
if(regex.test(document.add_data.password.value)){
alert("Good")
return true;
} else {
alert("Please fix: password")
return false;
}
}
&lt;/script&gt; </code>
For numbers only use /^[0-9]+$/

For mixed text and numbers, with spaces /^[0-9a-zA-Zs]+$/

Here are more useful regular expressions:

<code>[a-zA-Z] any letter
d any number; same as [0-9]
D any NOT number; same as [^0-9]
w any alphanumeric character; same as [a-zA-Z-0-9_]
W any NON-alphanumeric character; same as [^a-zA-Z0-9_]
s any whitespace (tab, space, newline, etc...)
S any NON-whitespace
n newline
t tab</code>

To view a full html sample of the above code click the links below using regular   expressions in JavaScript]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/javascript-non-alphanumeric-characters-regex/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Portion() function for trimming text</title>
		<link>http://newsourcemedia.com/blog/portion-function-for-trimming-text/</link>
		<comments>http://newsourcemedia.com/blog/portion-function-for-trimming-text/#comments</comments>
		<pubDate>Wed, 23 Feb 2005 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[String Manipulation]]></category>
		<category><![CDATA[length]]></category>
		<category><![CDATA[lenth.]]></category>
		<category><![CDATA[short]]></category>
		<category><![CDATA[shorten]]></category>
		<category><![CDATA[shorter]]></category>
		<category><![CDATA[start]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[trim]]></category>
		<category><![CDATA[values]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2005/02/22/portion-function-for-trimming-text/</guid>
		<description><![CDATA[Returns the portion of text specified by the start and length parameters. This help to trim text down for display in a small area or to give a sample of a larger body of text. I created this function to &#8230; <a href="http://newsourcemedia.com/blog/portion-function-for-trimming-text/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Returns the portion of text specified by the start and length parameters. This help to trim text down for display in a small area or to give a sample of a larger body of text.
<span id="more-184"></span>

I created this function to display a portion of listings on my home page under their related links to the full body of content.

This can helps your visitor to find the content faster as well as helps search engine better index your web site.

Portion() Code:
<pre lang="php"> <?
// function starts here
function portion($max_len,$str){
if(!$max_len)
$max_len = 12; // default max length of characters including blank spaces
if (strlen($str) > $max_len){
echo substr("$str", 0, $max_len)."..."; // your portion of text with trailing dots "..."
}
else
echo $str;
}
// function code end here

$str = "Hello World"; // edit or delete this line for your use
portion(7,"$str"); // call the function ( this will return "Hello W..." )

?></pre>]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/portion-function-for-trimming-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP strip remove white space from end of string</title>
		<link>http://newsourcemedia.com/blog/php-strip-remove-white-space-from-end-of-string/</link>
		<comments>http://newsourcemedia.com/blog/php-strip-remove-white-space-from-end-of-string/#comments</comments>
		<pubDate>Sat, 27 Mar 2004 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[String Manipulation]]></category>
		<category><![CDATA[rtrim]]></category>
		<category><![CDATA[shorten]]></category>
		<category><![CDATA[strip]]></category>
		<category><![CDATA[text]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[whitespace]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2004/03/26/php-strip-remove-white-space-from-end-of-string/</guid>
		<description><![CDATA[Need to remove the white space at the end of a string before recording the data. Use PHP's rtrim(). rtrim(): rtrim is great for deleting that unwanted space at then end of strings. The perfect example for using this function &#8230; <a href="http://newsourcemedia.com/blog/php-strip-remove-white-space-from-end-of-string/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Need to remove the white space at the end of a string before recording the data. Use PHP's rtrim().
<span id="more-204"></span>
rtrim():

rtrim is great for deleting that unwanted space at then end of strings. The perfect example for using this function is when receiving data from an online form and, at the end of a data field, some one leaves an extra white space. This white space means nothing and you want to delete it. rtrim() to the rescue.

Example:

<pre lang="php">
<?
$password = "123 ";
$password = rtrim($password);
// $password = "123"
?>
</pre>

Other Examples:

You can also trim down a string by matching words or letters and the end of a string.

Example:
<pre lang="php">
// Example 1: Character-by-character comparison match.

echo rtrim('This is a test test code', 'test code');
// returns 'This is a'

// Example 2: matches the last whole word with half the letters

echo rtrim('This is a test', 'est');
// returns 'This is a'
?> 
</pre>]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/php-strip-remove-white-space-from-end-of-string/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
