<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/substring</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sat, 25 May 2013 09:00:42 GMT</pubDate>
<item>
<title>(PHP) Substring between two strings - dmertl</title>
<link>http://snipplr.com/view/67576/substring-between-two-strings/</link>
<description><![CDATA[ <p>Get the substring between two strings</p> ]]></description>
<pubDate>Wed, 03 Oct 2012 12:26:03 GMT</pubDate>
<guid>http://snipplr.com/view/67576/substring-between-two-strings/</guid>
</item>
<item>
<title>(PHP) PHP - How to check if string contains substring PHP - satie83</title>
<link>http://snipplr.com/view/66212/php--how-to-check-if-string-contains-substring-php/</link>
<description><![CDATA[ <p>Once in a while we need to check whether a string contains substring, some other string or characters or a value. Checking for existence of a string (or substring) inside another string is easier than it might seem. The following article describes how to check for whether a string contains string in PHP, or simply said how to find string within string in PHP.</p> ]]></description>
<pubDate>Wed, 18 Jul 2012 20:48:04 GMT</pubDate>
<guid>http://snipplr.com/view/66212/php--how-to-check-if-string-contains-substring-php/</guid>
</item>
<item>
<title>(MySQL) Find and Replace MySQL column with substring - jgomez</title>
<link>http://snipplr.com/view/64199/find-and-replace-mysql-column-with-substring/</link>
<description><![CDATA[ <p>Example: There is a table, 'user', with a column, 'clear', containing values such as: 

`clear
--------
\'animal\'
\'pass'\
`

and we would like to retrieve 'animal' and 'pass' ( without the pre &amp; post \' )</p> ]]></description>
<pubDate>Wed, 28 Mar 2012 22:00:49 GMT</pubDate>
<guid>http://snipplr.com/view/64199/find-and-replace-mysql-column-with-substring/</guid>
</item>
<item>
<title>(PHP) Image blacklist - test a string against a blacklist in PHP - paulo72</title>
<link>http://snipplr.com/view/58061/image-blacklist--test-a-string-against-a-blacklist-in-php/</link>
<description><![CDATA[ <p>I was working on a site that pulled in and republished a bunch of RSS feeds. Some contained duff images such as blank gifs that I needed to block so I wrote this function to compare the url of an image against a blacklist</p> ]]></description>
<pubDate>Sat, 20 Aug 2011 23:36:08 GMT</pubDate>
<guid>http://snipplr.com/view/58061/image-blacklist--test-a-string-against-a-blacklist-in-php/</guid>
</item>
<item>
<title>(JavaScript) jQuery Image Replace using substring - inreflection7</title>
<link>http://snipplr.com/view/57682/jquery-image-replace-using-substring/</link>
<description><![CDATA[ <p>image rollovers in jquery are usually super easy. However it sucks when working with absolute image paths - like a separate media server or CDN. Heres a quick snippet using substring and lastIndexOf to swap out the image src.</p> ]]></description>
<pubDate>Tue, 09 Aug 2011 01:20:23 GMT</pubDate>
<guid>http://snipplr.com/view/57682/jquery-image-replace-using-substring/</guid>
</item>
<item>
<title>(JavaScript) substr (works with negative length values) - jatkins</title>
<link>http://snipplr.com/view/56951/substr-works-with-negative-length-values/</link>
<description><![CDATA[ <p>Released into the public domain.</p> ]]></description>
<pubDate>Thu, 21 Jul 2011 06:33:13 GMT</pubDate>
<guid>http://snipplr.com/view/56951/substr-works-with-negative-length-values/</guid>
</item>
<item>
<title>(C#) TruncateOnWordBoundary - a useful extension method for cutting a string short, but not in the middle of a word. - stewartrae</title>
<link>http://snipplr.com/view/54319/truncateonwordboundary--a-useful-extension-method-for-cutting-a-string-short-but-not-in-the-middle-of-a-word/</link>
<description><![CDATA[ <p>Ever wanted a method that can truncate a string, but only on a word boundary? This method works like Substring() but doesn't snip a string in the middle of a word, i.e. it only truncates the string on a word boundary. Useful for producing a summary from long text, or when limiting the length of an input field.</p> ]]></description>
<pubDate>Tue, 24 May 2011 17:02:11 GMT</pubDate>
<guid>http://snipplr.com/view/54319/truncateonwordboundary--a-useful-extension-method-for-cutting-a-string-short-but-not-in-the-middle-of-a-word/</guid>
</item>
<item>
<title>(PHP) Stupid Simple PHP Substring Example - ryarwood</title>
<link>http://snipplr.com/view/52585/stupid-simple-php-substring-example/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 26 Apr 2011 08:33:14 GMT</pubDate>
<guid>http://snipplr.com/view/52585/stupid-simple-php-substring-example/</guid>
</item>
<item>
<title>(jQuery) Get element's html before and after specified html string - karlhorky</title>
<link>http://snipplr.com/view/47888/get-elements-html-before-and-after-specified-html-string/</link>
<description><![CDATA[ <p>Get an element's html occurring before and after a specified string of html


Code modified from pastebin shared in StackOverflow answer:

http://stackoverflow.com/questions/1746115/jquery-substring-to-truncate-text#answer-1746142
http://pastebin.com/f737f7ce9</p> ]]></description>
<pubDate>Wed, 26 Jan 2011 11:48:24 GMT</pubDate>
<guid>http://snipplr.com/view/47888/get-elements-html-before-and-after-specified-html-string/</guid>
</item>
<item>
<title>(PHP) PHP substr - bodito</title>
<link>http://snipplr.com/view/46568/php-substr/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 06 Jan 2011 02:21:19 GMT</pubDate>
<guid>http://snipplr.com/view/46568/php-substr/</guid>
</item>
<item>
<title>(SQL) find one string inside another string, comparing two columns - powerthru</title>
<link>http://snipplr.com/view/42185/find-one-string-inside-another-string-comparing-two-columns/</link>
<description><![CDATA[ <p>in this case, we wanted to match fields where the district field in table b contained things like "LAM2-OUTSIDETOWN" and we wanted to match that to fields in table a which only had "LAM2" in them. "INSTR" ("in string") is our friend:</p> ]]></description>
<pubDate>Wed, 13 Oct 2010 16:18:45 GMT</pubDate>
<guid>http://snipplr.com/view/42185/find-one-string-inside-another-string-comparing-two-columns/</guid>
</item>
<item>
<title>(Ruby) Find n from the index of the nth occurrence of a substring - jatkins</title>
<link>http://snipplr.com/view/36381/find-n-from-the-index-of-the-nth-occurrence-of-a-substring/</link>
<description><![CDATA[ <p>Public domain. Returns n from the nth occurrence (`occurrence_index`) of `substring` in `var`, or -1 if `var` does not contain `substring` or `occurrence_index` exceeds the length of `var`. Does not account for overlapping substrings (one solution is to delimit substrings, such as with a space, so you can pass " or " as `substring` to find occurrences of "or" as a word).

See also [Find the nth occurrence of a substring](http://snipplr.com/view/36365/find-the-nth-occurrence-of-a-substring/).</p> ]]></description>
<pubDate>Sun, 27 Jun 2010 03:51:13 GMT</pubDate>
<guid>http://snipplr.com/view/36381/find-n-from-the-index-of-the-nth-occurrence-of-a-substring/</guid>
</item>
<item>
<title>(Ruby) Find the nth occurrence of a substring - jatkins</title>
<link>http://snipplr.com/view/36365/find-the-nth-occurrence-of-a-substring/</link>
<description><![CDATA[ <p>Public domain. Returns the nth occurrence of `substring` within `var`, or -1 if `var` does not include `n` substrings or if `n` is negative. Does not account for overlapping substrings (one solution is to delimit substrings, such as with a space, so you can pass " or " as `substring` to find occurrences of "or" as a word).

See also [Find n from the index of the nth occurrence of a substring](http://snipplr.com/view/36381/find-n-from-the-index-of-the-nth-occurrence-of-a-substring/).</p> ]]></description>
<pubDate>Sat, 26 Jun 2010 21:42:55 GMT</pubDate>
<guid>http://snipplr.com/view/36365/find-the-nth-occurrence-of-a-substring/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Format a UK Postcode (eg. AA99 9AA) - adrianparr</title>
<link>http://snipplr.com/view/34123/as3-format-a-uk-postcode-eg-aa99-9aa/</link>
<description><![CDATA[ <p>This code removes all the spaces and then inserts a single space so that the there are only 3 characters on the right-hand side (the inward code).</p> ]]></description>
<pubDate>Mon, 10 May 2010 08:02:34 GMT</pubDate>
<guid>http://snipplr.com/view/34123/as3-format-a-uk-postcode-eg-aa99-9aa/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Capitalise the First Letter of a String - adrianparr</title>
<link>http://snipplr.com/view/33586/as3-capitalise-the-first-letter-of-a-string/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 29 Apr 2010 09:08:52 GMT</pubDate>
<guid>http://snipplr.com/view/33586/as3-capitalise-the-first-letter-of-a-string/</guid>
</item>
<item>
<title>(JavaScript) Essential Javascript Techniques - alvincrespo</title>
<link>http://snipplr.com/view/28811/essential-javascript-techniques/</link>
<description><![CDATA[ <p>These are essential javascript techniques every javascriptr must know. I will be adding more to this list, let me know what you'd like to see. Thanks!</p> ]]></description>
<pubDate>Tue, 23 Feb 2010 17:52:23 GMT</pubDate>
<guid>http://snipplr.com/view/28811/essential-javascript-techniques/</guid>
</item>
<item>
<title>(Scheme) Scheme: find a substring - magicrebirth</title>
<link>http://snipplr.com/view/28007/scheme-find-a-substring/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 09 Feb 2010 03:47:29 GMT</pubDate>
<guid>http://snipplr.com/view/28007/scheme-find-a-substring/</guid>
</item>
<item>
<title>(VB.NET) Excel Find/Replace Substring - lancemonotone</title>
<link>http://snipplr.com/view/27507/excel-findreplace-substring/</link>
<description><![CDATA[ <p>Find and replace substring in a cell.</p> ]]></description>
<pubDate>Mon, 01 Feb 2010 14:34:10 GMT</pubDate>
<guid>http://snipplr.com/view/27507/excel-findreplace-substring/</guid>
</item>
<item>
<title>(PHP) substr_in_array() - lancemonotone</title>
<link>http://snipplr.com/view/27195/substrinarray/</link>
<description><![CDATA[ <p>Searches all array elements for a given substring.  Returns an array of found key=>value pairs or false if not found.</p> ]]></description>
<pubDate>Wed, 27 Jan 2010 16:56:06 GMT</pubDate>
<guid>http://snipplr.com/view/27195/substrinarray/</guid>
</item>
<item>
<title>(MySQL) select first character of second word (surname) - ReeceMarsland</title>
<link>http://snipplr.com/view/25209/select-first-character-of-second-word-surname/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 22 Dec 2009 03:48:08 GMT</pubDate>
<guid>http://snipplr.com/view/25209/select-first-character-of-second-word-surname/</guid>
</item>
</channel>
</rss>