<?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>scriptygoddess &#187; Regular Expressions</title>
	<atom:link href="http://www.scriptygoddess.com/archives/category/regular-expressions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com</link>
	<description></description>
	<lastBuildDate>Thu, 08 Dec 2011 18:23:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Reg Ex samples</title>
		<link>http://www.scriptygoddess.com/archives/2009/01/13/reg-ex-samples/</link>
		<comments>http://www.scriptygoddess.com/archives/2009/01/13/reg-ex-samples/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 20:28:30 +0000</pubDate>
		<dc:creator>Jennifer</dc:creator>
				<category><![CDATA[Regular Expressions]]></category>

		<guid isPermaLink="false">http://www.scriptygoddess.com/?p=1553</guid>
		<description><![CDATA[I&#039;ve been reading up on Reg Ex and just STARTING to get my head around the subject. One use I&#039;ve found for it immediately is with Dreamweaver. (Dreamweaver has a &#034;regular expression&#034; search option). Just for my own future re-use and storage &#8211; I&#039;ll post a few I&#039;ve used. (Will probably/hopefully add to this post [...]
No related posts.

Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>I&#039;ve been reading up on Reg Ex and just STARTING to get my head around the subject. One use I&#039;ve found for it immediately is with Dreamweaver. (Dreamweaver has a &#034;regular expression&#034; search option). Just for my own future re-use and storage &#8211; I&#039;ll post a few I&#039;ve used. (Will probably/hopefully add to this post over time&#8230;)</p>
<p>&lt;td&gt;&lt;a href=["].+["] target=["]_blank["]&gt;&lt;/a&gt;&lt;/td&gt;<br />
searches for<br />
&lt;td&gt;&lt;a href=&#034;ANYTHING CAN GO HERE&#034; target=&#034;_blank&#034;&gt;&lt;/a&gt;&lt;/td&gt;</p>
<p>&lt;[/]*tr&gt;<br />
searches for<br />
&lt;tr&gt; and &lt;/tr&gt;</p>
<p>To replace only PORTIONS of what you find -<br />
search for:<br />
&lt;td&gt;&lt;a href=["](.+)["] target=["]_blank["]&gt;<br />
and then you can replace lit like this<br />
&lt;td&gt;&lt;a href=["]$1["]&gt;<br />
(will &#034;save&#034; anything it found with (.+) and keep it in the replace with $1</p>
<p>Used this one today (6/5/09) &#8211; had to find spaces in a query string and replace it with %20<br />
(pagename.php[?]m=\S[^"]*)[\s]<br />
That will find pagename.php?m=anything except the ending quote<br />
It stores everything except the space (should be the last one in the query string) in $1 so you can do a replace with:<br />
$1%20</p>
<p>New one (8/14):<br />
&lt;!&#8211;.+&#8211;&gt;<br />
That will find all the comments on the page (again this is in dreamweaver)</p>
<p>Updated 7/26:<br />
\?\&gt;\s$$<br />
Finds a file with space after ?&gt; at the end of the file.</p>
<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://yarpp.org'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.scriptygoddess.com/archives/2009/01/13/reg-ex-samples/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

