<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-612</id>
	<title>Nabble - Cold Fusion - RegEx</title>
	<updated>2009-01-16T13:55:37Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Cold-Fusion---RegEx-f612.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cold-Fusion---RegEx-f612.html" />
	<subtitle type="html">This list deals with Regular Expressions as used in ColdFusion, Homesite/Studio, and Javascript.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-21509279</id>
	<title>Re: Break up an anchor tag.</title>
	<published>2009-01-16T13:55:37Z</published>
	<updated>2009-01-16T13:55:37Z</updated>
	<author>
		<name>Ian Skinner-3</name>
	</author>
	<content type="html">Peter Boughton wrote:
&lt;br&gt;&amp;gt; Hi Ian, I've cc-ed you directy incase the HoF emailing doesn't work again.
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt; Hmm, well in theory you'd make the outer bits non-greedy, but when
&lt;br&gt;&amp;gt; you've effectively made all parts optional, I'm not sure about
&lt;br&gt;&amp;gt; specifying a &amp;quot;priority&amp;quot; for which optional one is most important...
&lt;br&gt;&amp;gt; &amp;lt;a([^&amp;gt;]*?)(target=&amp;quot;[^&amp;quot;]*&amp;quot;)?([^&amp;gt;]*?)&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;Thanks, I got this message. &amp;nbsp;It looks like I posted my own code in my 
&lt;br&gt;first thread 
&lt;br&gt;[&lt;a href=&quot;http://www.houseoffusion.com/groups/regex/thread.cfm/threadid:232#1213&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/thread.cfm/threadid:232#1213&lt;/a&gt;] 
&lt;br&gt;about the same time as you posted yours here. &amp;nbsp;I knew I could fairly 
&lt;br&gt;easily develop code that would accomplish my goal if I broke it up into 
&lt;br&gt;several steps. &amp;nbsp;But as I am not very skilled at Regular Expressions yet 
&lt;br&gt;and this is just for a playtime project, I wanted to see how it could be 
&lt;br&gt;done with Regular Expressions as my intuition said it should be able to 
&lt;br&gt;be done.
&lt;br&gt;&lt;br&gt;If you care to review and critique my code I would be most happy to hear 
&lt;br&gt;what you might have to say.
&lt;br&gt;&lt;br&gt;Thanks for you help.
&lt;br&gt;Ian
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1216&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1216&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Break-up-an-anchor-tag.-tp21503354p21509279.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-21508205</id>
	<title>Re: Break up an anchor tag.</title>
	<published>2009-01-16T12:50:24Z</published>
	<updated>2009-01-16T12:50:24Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">Hi Ian, I've cc-ed you directy incase the HoF emailing doesn't work again.
&lt;br&gt;&lt;br&gt;&amp;gt; The first ([^]*) clause captures all the
&lt;br&gt;&amp;gt; properties of the anchor tag including the target property. &amp;nbsp;I want them
&lt;br&gt;&amp;gt; separated.
&lt;br&gt;&lt;br&gt;Hmm, well in theory you'd make the outer bits non-greedy, but when
&lt;br&gt;you've effectively made all parts optional, I'm not sure about
&lt;br&gt;specifying a &amp;quot;priority&amp;quot; for which optional one is most important...
&lt;br&gt;&amp;lt;a([^&amp;gt;]*?)(target=&amp;quot;[^&amp;quot;]*&amp;quot;)?([^&amp;gt;]*?)&amp;gt;
&lt;br&gt;&lt;br&gt;That aside, your wording suggests you're attempting to get three
&lt;br&gt;separate matches out of that (one for each parenthesis group), but
&lt;br&gt;with rematch function you get an array of matches per expression, but
&lt;br&gt;not an array of groups per match.
&lt;br&gt;&lt;br&gt;If you want that, then you need to grab each anchor, then loop through
&lt;br&gt;and manually convert each one.
&lt;br&gt;&lt;br&gt;Along the lines of this...
&lt;br&gt;&lt;br&gt;&amp;lt;cfset Anchors = rematch( '&amp;lt;a[^&amp;gt;]+&amp;gt;' , Input )/&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;cfdump var=&amp;quot;#Anchors#&amp;quot;/&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;hr/&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;cfset Delim = Chr(65536)/&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;cfloop index=&amp;quot;i&amp;quot; from=&amp;quot;1&amp;quot; to=&amp;quot;#ArrayLen(Anchors)#&amp;quot;&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cfset AnchorParts = rereplace( Anchors[i] ,
&lt;br&gt;'&amp;lt;a([^&amp;gt;]*?)(target\s*=\s*&amp;quot;[^&amp;quot;]+&amp;quot;)([^&amp;gt;]*?)&amp;gt;' , '\1#Delim#\2#Delim#\3' )
&lt;br&gt;/&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cfdump var=&amp;quot;#ListToArray( AnchorParts , Delim )#&amp;quot; label=&amp;quot;#Anchors[i]#&amp;quot;/&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;/cfloop&amp;gt;
&lt;br&gt;&lt;br&gt;&amp;lt;!--- (note the target attr is not optional - because of what the rest
&lt;br&gt;of the code does it's not necessary here) ---&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;Assuming I'm not misunderstanding you entirely, this still all seems a
&lt;br&gt;bit of an odd request - if you're able to expand more on the overall
&lt;br&gt;problem you're trying to solve (not the regex side, but why are you
&lt;br&gt;doing this, what is the relevance of target here, etc), then it might
&lt;br&gt;be possible to suggest a better overall solution.
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1214&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1214&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Break-up-an-anchor-tag.-tp21503354p21508205.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-21503354</id>
	<title>Break up an anchor tag.</title>
	<published>2009-01-16T08:39:30Z</published>
	<updated>2009-01-16T08:39:30Z</updated>
	<author>
		<name>Ian Skinner-3</name>
	</author>
	<content type="html">I did not get any responses to yesterday's question so here it is again, 
&lt;br&gt;rephrased.
&lt;br&gt;&lt;br&gt;Using ColdFusion 8's regex functionality how could I capture everything 
&lt;br&gt;before a target property, the target property - if it exists- and 
&lt;br&gt;everything after the target property.
&lt;br&gt;&lt;br&gt;I can do this, when the target property exists with this regex, but this 
&lt;br&gt;fails if the target property does not exist.
&lt;br&gt;&amp;lt;(/?)a([^&amp;gt;]*)(target=&amp;quot;[^&amp;quot;]*&amp;quot;)([^&amp;gt;]*)
&lt;br&gt;&lt;br&gt;If I add anything to make the the target clause optional ?,*,??,*?, I 
&lt;br&gt;get unexpected behavior. &amp;nbsp;The first ([^]*) clause captures all the 
&lt;br&gt;properties of the anchor tag including the target property. &amp;nbsp;I want them 
&lt;br&gt;separated.
&lt;br&gt;&lt;br&gt;I've tried other methods to select everything before the target property 
&lt;br&gt;such as just .*? but nothing I have tried has worked.
&lt;br&gt;&lt;br&gt;P.S. this will need to work with strings that could contain multiple 
&lt;br&gt;anchor tags and should not grab content from more then one tag.
&lt;br&gt;&lt;br&gt;Thanks Ian
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1211&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1211&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Break-up-an-anchor-tag.-tp21503354p21503354.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-21487736</id>
	<title>Re: Matching anchor tags</title>
	<published>2009-01-15T13:56:01Z</published>
	<updated>2009-01-15T13:56:01Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">I can't figure out what you're attempting to do... can you re-explain
&lt;br&gt;the aim of the expression?
&lt;br&gt;&lt;br&gt;Do you want to match the opening tag and the closing tag, or just one
&lt;br&gt;or the other?
&lt;br&gt;Are you attempting to remove/replace the target tag, or everything
&lt;br&gt;except it, or something else?
&lt;br&gt;&lt;br&gt;A closing tag is just &amp;lt;/a&amp;gt; - no need to complicate things unless you
&lt;br&gt;need to link it to the related opening tag for some reason?
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1210&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1210&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Matching-anchor-tags-tp21487557p21487736.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-21487557</id>
	<title>Matching anchor tags</title>
	<published>2009-01-15T13:38:58Z</published>
	<updated>2009-01-15T13:38:58Z</updated>
	<author>
		<name>Ian Skinner-3</name>
	</author>
	<content type="html">I am trying to match everything in an anchor tag, except the target 
&lt;br&gt;property. &amp;nbsp;I have this regex:
&lt;br&gt;&amp;lt;(/?)a([^&amp;gt;]*)target=&amp;quot;[^&amp;quot;]*&amp;quot;([^&amp;gt;]*)&amp;gt;
&lt;br&gt;&lt;br&gt;Which is working well for the opening &amp;lt;a&amp;gt;nchor tag. &amp;nbsp;But it does not 
&lt;br&gt;match the closing tag because a closing tag does not have a target 
&lt;br&gt;property. &amp;nbsp;How would I make the entire 'target=&amp;quot;[^&amp;quot;]&amp;quot; in the middle 
&lt;br&gt;optional?
&lt;br&gt;&lt;br&gt;I tried wrapping it in parenthesis and putting a '?' after it, but that 
&lt;br&gt;does not seem to work.
&lt;br&gt;&amp;lt;(/?)a([^&amp;gt;]*)(target=&amp;quot;[^&amp;quot;]*&amp;quot;)?([^&amp;gt;]*)&amp;gt;
&lt;br&gt;&lt;br&gt;Thank You
&lt;br&gt;Ian
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1209&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1209&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Matching-anchor-tags-tp21487557p21487557.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20702251</id>
	<title>Re: convert a php regex to coldfusion regex</title>
	<published>2008-11-26T06:45:41Z</published>
	<updated>2008-11-26T06:45:41Z</updated>
	<author>
		<name>phipps_73</name>
	</author>
	<content type="html">Brilliant, thanks Peter. One day I will &amp;quot;click&amp;quot; with regex!
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Dave
&lt;br&gt;&lt;br&gt;2008/11/26 Peter Boughton &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=20702251&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;boughtonp@...&lt;/a&gt;&amp;gt;:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; If you have time could you explain what each part of the regex is
&lt;br&gt;&amp;gt;&amp;gt; doing, so that I can learn for future?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sure. :)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Starting with the original PHP one:
&lt;br&gt;&amp;gt; /(\s)(\w+)$/i
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; the /.../i means &amp;quot;a regular expression, using the i flag&amp;quot;
&lt;br&gt;&amp;gt; the i flag is &amp;quot;case-Insensitive&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; the (\s) is &amp;quot;a group consisting of a single whiteSpace character
&lt;br&gt;&amp;gt; (space,tab,newline)&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; the (\w+) is &amp;quot;a group consisting of one or more Word characters&amp;quot;
&lt;br&gt;&amp;gt; the + part of that means &amp;quot;one or more&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; the $ at the end means &amp;quot;end of line&amp;quot; or &amp;quot;end of expression&amp;quot;, depending
&lt;br&gt;&amp;gt; on if the expression is multi-line or not. It matches the position,
&lt;br&gt;&amp;gt; not a character (it is a zero-width match).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The slashes are used for PHP when you want to specify a flag - if you
&lt;br&gt;&amp;gt; had no flags, the slashes are not necessary.
&lt;br&gt;&amp;gt; Some languages (JavaScript) can work with non-quoted slashes, whilst
&lt;br&gt;&amp;gt; others (CFML) do not use the slash convention at all.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In all of these, there is an alternative way to specify flags, using
&lt;br&gt;&amp;gt; the construct (?i) - note that anything (?...) is a special group,
&lt;br&gt;&amp;gt; that acts differently to other groups. (note: this construct can be
&lt;br&gt;&amp;gt; used for a lot more than just flags - primarily lookarounds, but other
&lt;br&gt;&amp;gt; stuff too)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In CFML, you can use reReplaceNoCase instead of the i flag, which is
&lt;br&gt;&amp;gt; more readable for people that don't know regex.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In the replace string of &amp;quot; and $2&amp;quot; or &amp;quot; and \2&amp;quot; in the PHP/CFML ones,
&lt;br&gt;&amp;gt; the $2 or \2 is a backreference referring to group 2 - i.e. the second
&lt;br&gt;&amp;gt; pair of parentheses, containing the \w+ (&amp;quot;one or more word
&lt;br&gt;&amp;gt; characters&amp;quot;)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; In the simplified version, I removed the flag, removed the groups,
&lt;br&gt;&amp;gt; removed the space, and changed the replace string, so we ended up
&lt;br&gt;&amp;gt; with:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; reReplace( wkstr , '\w+$','and \0' )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The flag was unnecessary - the \w means &amp;quot;any word character&amp;quot; and is
&lt;br&gt;&amp;gt; not case sensitive.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The \s was unnecessary because the \w+ will capture all of the
&lt;br&gt;&amp;gt; characters upto the space, and we were just putting the space back in,
&lt;br&gt;&amp;gt; so I took both the \s out and the space before the &amp;quot;and&amp;quot; out also.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; With the \s gone, there was no need to group the characters and use \2
&lt;br&gt;&amp;gt; (or \1 as it would have become) - instead I used \0 in the replace
&lt;br&gt;&amp;gt; string, which means &amp;quot;the entire content of the match&amp;quot;, rather than one
&lt;br&gt;&amp;gt; of the groups within it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; So, I think that covers everything - hopefully it all makes sense, and
&lt;br&gt;&amp;gt; wasn't information overload.
&lt;br&gt;&amp;gt; Let me know if you'd like any part clarified/re-worded. :)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1202&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1202&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/convert-a-php-regex-to-coldfusion-regex-tp20698881p20702251.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20701370</id>
	<title>Re: convert a php regex to coldfusion regex</title>
	<published>2008-11-26T05:51:40Z</published>
	<updated>2008-11-26T05:51:40Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">&amp;gt; If you have time could you explain what each part of the regex is
&lt;br&gt;&amp;gt; doing, so that I can learn for future?
&lt;br&gt;&lt;br&gt;Sure. :)
&lt;br&gt;&lt;br&gt;&lt;br&gt;Starting with the original PHP one:
&lt;br&gt;/(\s)(\w+)$/i
&lt;br&gt;&lt;br&gt;the /.../i means &amp;quot;a regular expression, using the i flag&amp;quot;
&lt;br&gt;the i flag is &amp;quot;case-Insensitive&amp;quot;
&lt;br&gt;&lt;br&gt;the (\s) is &amp;quot;a group consisting of a single whiteSpace character
&lt;br&gt;(space,tab,newline)&amp;quot;
&lt;br&gt;&lt;br&gt;the (\w+) is &amp;quot;a group consisting of one or more Word characters&amp;quot;
&lt;br&gt;the + part of that means &amp;quot;one or more&amp;quot;
&lt;br&gt;&lt;br&gt;the $ at the end means &amp;quot;end of line&amp;quot; or &amp;quot;end of expression&amp;quot;, depending
&lt;br&gt;on if the expression is multi-line or not. It matches the position,
&lt;br&gt;not a character (it is a zero-width match).
&lt;br&gt;&lt;br&gt;&lt;br&gt;The slashes are used for PHP when you want to specify a flag - if you
&lt;br&gt;had no flags, the slashes are not necessary.
&lt;br&gt;Some languages (JavaScript) can work with non-quoted slashes, whilst
&lt;br&gt;others (CFML) do not use the slash convention at all.
&lt;br&gt;&lt;br&gt;In all of these, there is an alternative way to specify flags, using
&lt;br&gt;the construct (?i) - note that anything (?...) is a special group,
&lt;br&gt;that acts differently to other groups. (note: this construct can be
&lt;br&gt;used for a lot more than just flags - primarily lookarounds, but other
&lt;br&gt;stuff too)
&lt;br&gt;&lt;br&gt;In CFML, you can use reReplaceNoCase instead of the i flag, which is
&lt;br&gt;more readable for people that don't know regex.
&lt;br&gt;&lt;br&gt;&lt;br&gt;In the replace string of &amp;quot; and $2&amp;quot; or &amp;quot; and \2&amp;quot; in the PHP/CFML ones,
&lt;br&gt;the $2 or \2 is a backreference referring to group 2 - i.e. the second
&lt;br&gt;pair of parentheses, containing the \w+ (&amp;quot;one or more word
&lt;br&gt;characters&amp;quot;)
&lt;br&gt;&lt;br&gt;&lt;br&gt;In the simplified version, I removed the flag, removed the groups,
&lt;br&gt;removed the space, and changed the replace string, so we ended up
&lt;br&gt;with:
&lt;br&gt;&lt;br&gt;reReplace( wkstr , '\w+$','and \0' )
&lt;br&gt;&lt;br&gt;The flag was unnecessary - the \w means &amp;quot;any word character&amp;quot; and is
&lt;br&gt;not case sensitive.
&lt;br&gt;&lt;br&gt;The \s was unnecessary because the \w+ will capture all of the
&lt;br&gt;characters upto the space, and we were just putting the space back in,
&lt;br&gt;so I took both the \s out and the space before the &amp;quot;and&amp;quot; out also.
&lt;br&gt;&lt;br&gt;With the \s gone, there was no need to group the characters and use \2
&lt;br&gt;(or \1 as it would have become) - instead I used \0 in the replace
&lt;br&gt;string, which means &amp;quot;the entire content of the match&amp;quot;, rather than one
&lt;br&gt;of the groups within it.
&lt;br&gt;&lt;br&gt;&lt;br&gt;So, I think that covers everything - hopefully it all makes sense, and
&lt;br&gt;wasn't information overload.
&lt;br&gt;Let me know if you'd like any part clarified/re-worded. :)
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1201&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1201&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/convert-a-php-regex-to-coldfusion-regex-tp20698881p20701370.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20700721</id>
	<title>Re: convert a php regex to coldfusion regex</title>
	<published>2008-11-26T05:16:44Z</published>
	<updated>2008-11-26T05:16:44Z</updated>
	<author>
		<name>phipps_73</name>
	</author>
	<content type="html">Many thanks Peter,
&lt;br&gt;&lt;br&gt;The &amp;quot; Sunday&amp;quot; was appended after the regex was applied so your
&lt;br&gt;solution works perfectly.
&lt;br&gt;&lt;br&gt;If you have time could you explain what each part of the regex is
&lt;br&gt;doing, so that I can learn for future?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Dave
&lt;br&gt;&lt;br&gt;2008/11/26 Peter Boughton &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=20700721&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;boughtonp@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; Sorry, brain-dead for a moment. :(
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The two expressions above are incorrect - they should be
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; $wkstr = reReplaceNoCase($wkstr,'(\s)(\w+)$',' and \2')
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; wkstr = reReplace( wkstr , '\w+$','and \0' )
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1200&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1200&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/convert-a-php-regex-to-coldfusion-regex-tp20698881p20700721.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20700157</id>
	<title>Re: convert a php regex to coldfusion regex</title>
	<published>2008-11-26T04:39:29Z</published>
	<updated>2008-11-26T04:39:29Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">Sorry, brain-dead for a moment. :(
&lt;br&gt;&lt;br&gt;The two expressions above are incorrect - they should be
&lt;br&gt;&lt;br&gt;$wkstr = reReplaceNoCase($wkstr,'(\s)(\w+)$',' and \2')
&lt;br&gt;&lt;br&gt;wkstr = reReplace( wkstr , '\w+$','and \0' )
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1199&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1199&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/convert-a-php-regex-to-coldfusion-regex-tp20698881p20700157.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20699990</id>
	<title>Re: convert a php regex to coldfusion regex</title>
	<published>2008-11-26T04:28:45Z</published>
	<updated>2008-11-26T04:28:45Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">I'm not certain that regex is doing exactly what you say it is, but
&lt;br&gt;simply converting the PHP directly to CFML isas follows:
&lt;br&gt;&lt;br&gt;$wkstr = reReplaceNoCase('(\s)(\w+)$',' and \2',$wkstr)
&lt;br&gt;&lt;br&gt;Although the $ at the start of the variable names are not required in
&lt;br&gt;CF, and the expression doesn't need to be that complex.
&lt;br&gt;&lt;br&gt;This should do the same thing:
&lt;br&gt;&lt;br&gt;wkstr = reReplace( '\w+$' , 'and \0' , &amp;nbsp;wkstr )
&lt;br&gt;&lt;br&gt;&lt;br&gt;For any of these expressions to work though, they can't be ran against
&lt;br&gt;the entire &amp;quot;Every first second third fourth Sunday at 11:15&amp;quot; string,
&lt;br&gt;but only on the &amp;quot;first second third fourth&amp;quot; string, otherwise they
&lt;br&gt;will not work as desired.
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1198&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1198&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/convert-a-php-regex-to-coldfusion-regex-tp20698881p20699990.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20698881</id>
	<title>convert a php regex to coldfusion regex</title>
	<published>2008-11-26T03:07:51Z</published>
	<updated>2008-11-26T03:07:51Z</updated>
	<author>
		<name>phipps_73</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I am afraid that my regex skills are weak and I am in the final stage
&lt;br&gt;of converting a php script to a coldfusion one. I am building a string
&lt;br&gt;which can be of the form:
&lt;br&gt;&lt;br&gt;Every first second third fourth Sunday at 11:15
&lt;br&gt;&lt;br&gt;What the php regex does is changes the above to read:
&lt;br&gt;&lt;br&gt;Every first second third and fourth Sunday at 11:15
&lt;br&gt;&lt;br&gt;It adds the &amp;quot; and&amp;quot;.
&lt;br&gt;&lt;br&gt;The php regex is as follows:
&lt;br&gt;&lt;br&gt;$wkstr = preg_replace('/(\s)(\w+)$/i',' and $2',$wkstr);
&lt;br&gt;&lt;br&gt;and I need to convert this to a ReReplace function. I have looked at
&lt;br&gt;the php docs to try and decipher the above regex but I don't seem to
&lt;br&gt;be getting anywhere. I also don't know enough about cf regex to know
&lt;br&gt;what I should convert it to.
&lt;br&gt;&lt;br&gt;Can anyone help, please?
&lt;br&gt;&lt;br&gt;Many thanks,
&lt;br&gt;&lt;br&gt;Dave
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1197&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1197&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/convert-a-php-regex-to-coldfusion-regex-tp20698881p20698881.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20639510</id>
	<title>Re: [URGENT] Incremental matches!</title>
	<published>2008-11-22T11:05:33Z</published>
	<updated>2008-11-22T11:05:33Z</updated>
	<author>
		<name>is_maximum</name>
	</author>
	<content type="html">well guys 
&lt;br&gt;this works fine thank you all
&lt;br&gt;&lt;br&gt;select *
&lt;br&gt;from NODE_TABLE
&lt;br&gt;where '1.1.1.2.1' like id + '%' and id not like '1.1.1.2.1%'
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;--
&lt;i&gt;Regards&lt;/i&gt;&lt;br&gt;
Mohammad Norouzi&lt;br&gt;
&lt;b&gt;Help each other to reach the future faster&lt;/b&gt;&lt;br&gt;
&lt;a href=&quot;http://pixelshot.wordpress.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pixelshot Photoblog&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://brainable.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Brainable Blog&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-URGENT--Incremental-matches%21-tp20577717p20639510.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20606201</id>
	<title>Re: [URGENT] Incremental matches!</title>
	<published>2008-11-20T09:26:26Z</published>
	<updated>2008-11-20T09:26:26Z</updated>
	<author>
		<name>is_maximum</name>
	</author>
	<content type="html">Well
&lt;br&gt;Chris Porter, has just replied me with a smart solution but I can't test it right now until I get to work. I don't know why he can't post here.
&lt;br&gt;&lt;br&gt;this is the solution:
&lt;br&gt;&lt;br&gt;select *
&lt;br&gt;from NODE_TABLE
&lt;br&gt;where '1.1.1.2.1' like id + '%' and id not like '1.1.1.2.1%'
&lt;br&gt;&lt;br&gt;We are using OpenJPA and Oracle database. I am eager to check if it works well
&lt;br&gt;&lt;br&gt;Thanks all 
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;--
&lt;i&gt;Regards&lt;/i&gt;&lt;br&gt;
Mohammad Norouzi&lt;br&gt;
&lt;b&gt;Help each other to reach the future faster&lt;/b&gt;&lt;br&gt;
&lt;a href=&quot;http://pixelshot.wordpress.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pixelshot Photoblog&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://brainable.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Brainable Blog&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-URGENT--Incremental-matches%21-tp20577717p20606201.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20603104</id>
	<title>Re: [URGENT] Incremental matches!</title>
	<published>2008-11-20T07:11:20Z</published>
	<updated>2008-11-20T07:11:20Z</updated>
	<author>
		<name>is_maximum</name>
	</author>
	<content type="html">Well, I have a tree structure in database in which each node has its own unique id as above, say 1.1.1.2.1 now by given a node and its position (the same id) I have to extract all its parents and return back to the client. the parents' ids are identified by that unique id (1, 1.1, 1.1.1 AND 1.1.1.2) if it was only one node there was no problem using a for loop but we may have hundreds of these nodes and should extract all of them each for a user concurrently and this is a performance issue
&lt;br&gt;&lt;br&gt;now I am welcome if you can help me on this with anything better than Regex
&lt;br&gt;&lt;br&gt;thanks
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Peter Boughton wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;&amp;gt; Thanks Adrian, No actually I am using Java Regex but I think they are alike.
&lt;br&gt;&amp;gt; I want not to use any for loop
&lt;br&gt;&lt;br&gt;Why not?
&lt;br&gt;&lt;br&gt;Can you provide more context as to what you're actually doing? It
&lt;br&gt;might enable a better answer.
&lt;br&gt;&lt;br&gt;&lt;br&gt;You can do:
&lt;br&gt;^\d for 1
&lt;br&gt;^\d(\.\d){1} for 1.1
&lt;br&gt;^\d(\.\d){2} for 1.1.2
&lt;br&gt;^\d(\.\d){3} for 1.1.2.1
&lt;br&gt;etc
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1193&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1193&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;div class=&quot;signature&quot;&gt;--
&lt;i&gt;Regards&lt;/i&gt;&lt;br&gt;
Mohammad Norouzi&lt;br&gt;
&lt;b&gt;Help each other to reach the future faster&lt;/b&gt;&lt;br&gt;
&lt;a href=&quot;http://pixelshot.wordpress.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pixelshot Photoblog&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://brainable.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Brainable Blog&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-URGENT--Incremental-matches%21-tp20577717p20603104.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20591385</id>
	<title>Re: [URGENT] Incremental matches!</title>
	<published>2008-11-19T14:54:55Z</published>
	<updated>2008-11-19T14:54:55Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">&amp;gt; Thanks Adrian, No actually I am using Java Regex but I think they are alike.
&lt;br&gt;&amp;gt; I want not to use any for loop
&lt;br&gt;&lt;br&gt;Why not?
&lt;br&gt;&lt;br&gt;Can you provide more context as to what you're actually doing? It
&lt;br&gt;might enable a better answer.
&lt;br&gt;&lt;br&gt;&lt;br&gt;You can do:
&lt;br&gt;^\d for 1
&lt;br&gt;^\d(\.\d){1} for 1.1
&lt;br&gt;^\d(\.\d){2} for 1.1.2
&lt;br&gt;^\d(\.\d){3} for 1.1.2.1
&lt;br&gt;etc
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1193&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1193&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-URGENT--Incremental-matches%21-tp20577717p20591385.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20585783</id>
	<title>Re: [URGENT] Incremental matches!</title>
	<published>2008-11-19T10:08:35Z</published>
	<updated>2008-11-19T10:08:35Z</updated>
	<author>
		<name>S. Isaac Dealey</name>
	</author>
	<content type="html">&amp;gt; consider the current position I have is &amp;quot;1.1.2.1.3&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I need to extract the following values:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 1
&lt;br&gt;&amp;gt; 1.1
&lt;br&gt;&amp;gt; 1.1.2
&lt;br&gt;&amp;gt; 1.1.2.1
&lt;br&gt;&amp;gt; 1.1.2.1.3
&lt;br&gt;&lt;br&gt;I don't think there's a way to get that with a single regex... But this
&lt;br&gt;would work 
&lt;br&gt;&lt;br&gt;&amp;lt;cfset a = [] /&amp;gt;
&lt;br&gt;&amp;lt;cfloop index=&amp;quot;x&amp;quot; list=&amp;quot;1.1.2.1.3&amp;quot; delimiter=&amp;quot;.&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;cfset temp = a[arraylen(a)] /&amp;gt;
&lt;br&gt;&amp;lt;cfset temp = listappend(temp,x,&amp;quot;.&amp;quot;) /&amp;gt;
&lt;br&gt;&amp;lt;cfset arrayAppend(a,temp) /&amp;gt;
&lt;br&gt;&amp;lt;/cfloop&amp;gt;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;s. isaac dealey &amp;nbsp;^ &amp;nbsp;new epoch
&lt;br&gt;&amp;nbsp;isn't it time for a change? 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ph: 781.769.0723
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://onTap.riaforge.org/blog&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://onTap.riaforge.org/blog&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1192&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1192&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-URGENT--Incremental-matches%21-tp20577717p20585783.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20584371</id>
	<title>RE: [URGENT] Incremental matches!</title>
	<published>2008-11-19T09:06:06Z</published>
	<updated>2008-11-19T09:06:06Z</updated>
	<author>
		<name>is_maximum</name>
	</author>
	<content type="html">&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Adrian Lynch wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Are you using ColdFusion?
&lt;br&gt;&lt;br&gt;No need to use RegEx, it's a list so:
&lt;br&gt;&lt;br&gt;&amp;lt;cfoutput&amp;gt;
&lt;br&gt;&amp;lt;cfloop list=&amp;quot;#position#&amp;quot; index=&amp;quot;i&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #i#&amp;lt;br /&amp;gt;
&lt;br&gt;&amp;lt;/cfloop&amp;gt;
&lt;br&gt;&amp;lt;/cfoutput&amp;gt;
&lt;br&gt;&lt;br&gt;Not a complete solution for you but you can see how to get at all the list
&lt;br&gt;elements.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
Thanks Adrian, No actually I am using Java Regex but I think they are alike. I want not to use any for loop
&lt;br&gt;&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;--
&lt;i&gt;Regards&lt;/i&gt;&lt;br&gt;
Mohammad Norouzi&lt;br&gt;
&lt;b&gt;Help each other to reach the future faster&lt;/b&gt;&lt;br&gt;
&lt;a href=&quot;http://pixelshot.wordpress.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pixelshot Photoblog&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://brainable.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Brainable Blog&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-URGENT--Incremental-matches%21-tp20577717p20584371.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20579614</id>
	<title>RE: [URGENT] Incremental matches!</title>
	<published>2008-11-19T05:19:52Z</published>
	<updated>2008-11-19T05:19:52Z</updated>
	<author>
		<name>Adrian Lynch</name>
	</author>
	<content type="html">Are you using ColdFusion?
&lt;br&gt;&lt;br&gt;No need to use RegEx, it's a list so:
&lt;br&gt;&lt;br&gt;&amp;lt;cfoutput&amp;gt;
&lt;br&gt;&amp;lt;cfloop list=&amp;quot;#position#&amp;quot; index=&amp;quot;i&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #i#&amp;lt;br /&amp;gt;
&lt;br&gt;&amp;lt;/cfloop&amp;gt;
&lt;br&gt;&amp;lt;/cfoutput&amp;gt;
&lt;br&gt;&lt;br&gt;Not a complete solution for you but you can see how to get at all the list
&lt;br&gt;elements.
&lt;br&gt;&lt;br&gt;Adrian
&lt;br&gt;Building a database of ColdFusion errors at &lt;a href=&quot;http://cferror.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cferror.org/&lt;/a&gt;&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: is_maximum
&lt;br&gt;Sent: 19 November 2008 13:14
&lt;br&gt;To: regex
&lt;br&gt;Subject: [URGENT] Incremental matches!
&lt;br&gt;&lt;br&gt;&lt;br&gt;Hello
&lt;br&gt;I have a string we call it position and this is in the form of '1.2.1.1'
&lt;br&gt;&lt;br&gt;consider the current position I have is &amp;quot;1.1.2.1.3&amp;quot;
&lt;br&gt;&lt;br&gt;I need to extract the following values:
&lt;br&gt;&lt;br&gt;1
&lt;br&gt;1.1
&lt;br&gt;1.1.2
&lt;br&gt;1.1.2.1
&lt;br&gt;1.1.2.1.3
&lt;br&gt;&lt;br&gt;or if position is &amp;quot;1.1.2&amp;quot;
&lt;br&gt;&lt;br&gt;I need:
&lt;br&gt;1
&lt;br&gt;1.1
&lt;br&gt;1.1.2
&lt;br&gt;&lt;br&gt;is this possible by using Regex?
&lt;br&gt;&lt;br&gt;thanks
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----
&lt;br&gt;--
&lt;br&gt;Regards
&lt;br&gt;&lt;br&gt;Mohammad Norouzi
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1189&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1189&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-URGENT--Incremental-matches%21-tp20577717p20579614.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-20577717</id>
	<title>[URGENT] Incremental matches!</title>
	<published>2008-11-19T03:12:27Z</published>
	<updated>2008-11-19T03:12:27Z</updated>
	<author>
		<name>is_maximum</name>
	</author>
	<content type="html">Hello
&lt;br&gt;I have a string we call it position and this is in the form of '1.2.1.1'
&lt;br&gt;&lt;br&gt;consider the current position I have is &amp;quot;1.1.2.1.3&amp;quot;
&lt;br&gt;&lt;br&gt;I need to extract the following values:
&lt;br&gt;&lt;br&gt;1
&lt;br&gt;1.1
&lt;br&gt;1.1.2
&lt;br&gt;1.1.2.1
&lt;br&gt;1.1.2.1.3
&lt;br&gt;&lt;br&gt;or if position is &amp;quot;1.1.2&amp;quot;
&lt;br&gt;&lt;br&gt;I need:
&lt;br&gt;1
&lt;br&gt;1.1
&lt;br&gt;1.1.2
&lt;br&gt;&lt;br&gt;is this possible by using Regex?
&lt;br&gt;&lt;br&gt;thanks
&lt;br&gt;&lt;div class=&quot;signature&quot;&gt;--
&lt;i&gt;Regards&lt;/i&gt;&lt;br&gt;
Mohammad Norouzi&lt;br&gt;
&lt;b&gt;Help each other to reach the future faster&lt;/b&gt;&lt;br&gt;
&lt;a href=&quot;http://pixelshot.wordpress.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Pixelshot Photoblog&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://brainable.blogspot.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Brainable Blog&lt;/a&gt;&lt;br&gt;
&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-URGENT--Incremental-matches%21-tp20577717p20577717.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19784066</id>
	<title>Re: Capitalize first letter of all words.</title>
	<published>2008-10-02T10:35:14Z</published>
	<updated>2008-10-02T10:35:14Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">On Thu, Oct 2, 2008 at 18:15, Ian Skinner &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=19784066&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;HOF@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; The trick being that this has to work on a ColdFusion 4.5 server, so the
&lt;br&gt;&amp;gt; /u switch is apparently out!
&lt;br&gt;&lt;br&gt;Does it work if you put the slash the right way round? (it's \u not /u)
&lt;br&gt;&lt;br&gt;Can CF4.5 use Java objects? If so, you can use RegEx within Java.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; I have reReplace(myString,'(^.| .)','-\1-','ALL') working so that it
&lt;br&gt;&amp;gt; captures the first character of all the words.
&lt;br&gt;&lt;br&gt;Hmmm, at the very least those &amp;quot;.&amp;quot; should almost certainly be &amp;quot;\w&amp;quot;.
&lt;br&gt;Depending on what you're actually doing, simply &amp;quot;\b\w&amp;quot; might be better.
&lt;br&gt;(But that doesn't help without being able to act on the results)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; &amp;nbsp;Now I need to find away
&lt;br&gt;&amp;gt; to convert the back reference to an upper case version of itself.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Anybody got any ideas?
&lt;br&gt;&lt;br&gt;Other than using Java, if possible, I can't think of a RegEx solution for this.
&lt;br&gt;&lt;br&gt;However, this is a crude non-RegEx solution that might be good enough for you:
&lt;br&gt;&lt;br&gt;&amp;lt;cfloop index=&amp;quot;i&amp;quot; from=&amp;quot;1&amp;quot; to=&amp;quot;#ListLen(myString,' ')#&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cfset CurWord = ListGetAt( myString , i , ' ' )/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cfset CapsWord = UCase(Left(CurWord,1)) &amp; Right(CurWord,Len(CurWord)-1)/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;cfset myString = ListSetAt( myString , i , CapsWord , ' ' )/&amp;gt;
&lt;br&gt;&amp;lt;/cfloop&amp;gt;
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1177&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1177&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Capitalize-first-letter-of-all-words.-tp19783722p19784066.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19784030</id>
	<title>RE: Capitalize first letter of all words.</title>
	<published>2008-10-02T10:33:06Z</published>
	<updated>2008-10-02T10:33:06Z</updated>
	<author>
		<name>Adrian Lynch</name>
	</author>
	<content type="html">If you don't mind a loop solution:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://cflib.org/index.cfm?event=page.udfbyid&amp;udfid=889&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cflib.org/index.cfm?event=page.udfbyid&amp;udfid=889&lt;/a&gt;&lt;br&gt;&lt;br&gt;Adrian
&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: Ian Skinner [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=19784030&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;HOF@...&lt;/a&gt;]
&lt;br&gt;Sent: 02 October 2008 18:15
&lt;br&gt;To: regex
&lt;br&gt;Subject: Capitalize first letter of all words.
&lt;br&gt;&lt;br&gt;&lt;br&gt;The trick being that this has to work on a ColdFusion 4.5 server, so the 
&lt;br&gt;/u switch is apparently out!
&lt;br&gt;&lt;br&gt;I have reReplace(myString,'(^.| .)','-\1-','ALL') working so that it 
&lt;br&gt;captures the first character of all the words. &amp;nbsp;Now I need to find away 
&lt;br&gt;to convert the back reference to an upper case version of itself.
&lt;br&gt;&lt;br&gt;Anybody got any ideas?
&lt;br&gt;&lt;br&gt;TIA
&lt;br&gt;IAN
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1176&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1176&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Capitalize-first-letter-of-all-words.-tp19783722p19784030.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19783722</id>
	<title>Capitalize first letter of all words.</title>
	<published>2008-10-02T10:15:18Z</published>
	<updated>2008-10-02T10:15:18Z</updated>
	<author>
		<name>Ian Skinner-3</name>
	</author>
	<content type="html">The trick being that this has to work on a ColdFusion 4.5 server, so the 
&lt;br&gt;/u switch is apparently out!
&lt;br&gt;&lt;br&gt;I have reReplace(myString,'(^.| .)','-\1-','ALL') working so that it 
&lt;br&gt;captures the first character of all the words. &amp;nbsp;Now I need to find away 
&lt;br&gt;to convert the back reference to an upper case version of itself.
&lt;br&gt;&lt;br&gt;Anybody got any ideas?
&lt;br&gt;&lt;br&gt;TIA
&lt;br&gt;IAN
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;207172674;29440083;f&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;207172674;29440083;f&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1175&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1175&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/regex/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/regex/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Capitalize-first-letter-of-all-words.-tp19783722p19783722.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19208190</id>
	<title>Re: Find a table cell containing an image tag.</title>
	<published>2008-08-28T13:06:28Z</published>
	<updated>2008-08-28T13:06:28Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">&amp;gt; they are irrelevant and unavailable to this conversion exercise. &amp;nbsp;I
&lt;br&gt;&amp;gt; could make them compliant and ignore them. &amp;nbsp;But since this is more a
&lt;br&gt;&amp;gt; learning exercise then anything...
&lt;br&gt;&lt;br&gt;Fair enough on both counts. :)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; The main features I do not grok is the what role the [^&amp;gt;] plays
&lt;br&gt;&lt;br&gt;That's for if you don't know (or don't want to limit) what attributes
&lt;br&gt;a tag contains.
&lt;br&gt;&lt;br&gt;A tag cannot contain a &amp;gt; character - any necessary ones would be
&lt;br&gt;escaped as &amp;gt;
&lt;br&gt;&lt;br&gt;You could use a non-greedy wildcard like &amp;lt;tag.*?&amp;gt; but I use &amp;lt;tag[^&amp;gt;]*&amp;gt;
&lt;br&gt;as it is more precise.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; how to interpret this part in front of the negative look behind; ?:[^/]/
&lt;br&gt;&lt;br&gt;Ah, you're mis-reading that slightly. There are a few parts at play
&lt;br&gt;here, I'll attempt to explain them individually in a simpler
&lt;br&gt;context...
&lt;br&gt;&lt;br&gt;(note, I'm adding spaces purely for readability - pretend there are no
&lt;br&gt;spaces in any of the following examples)
&lt;br&gt;&lt;br&gt;&lt;br&gt;( x | y ) is the standard &amp;quot;x OR y&amp;quot; &amp;nbsp;- the parentheses are necessary to
&lt;br&gt;prevent the OR from applying to the whole of the expression.
&lt;br&gt;&lt;br&gt;However, using parentheses means that regex will capture the contents
&lt;br&gt;for a backreference. This is not necessary here, so tell it to discard
&lt;br&gt;the contents, we put ?: inside the parens, so we get (?: x | y )
&lt;br&gt;p.s. this also works without the OR operator - just as (?: x )
&lt;br&gt;&lt;br&gt;The first part of the OR is [^/] which means simply &amp;quot;not /&amp;quot; - putting
&lt;br&gt;caret (^) inside brackets negates them.
&lt;br&gt;e.g [^abc] means &amp;quot;a single character that is not a nor b nor c&amp;quot;
&lt;br&gt;&lt;br&gt;Then, there's a negative lookahead which is (?! x ) and is the inverse
&lt;br&gt;of a regular lookahead - i.e. it makes sure the contents of the parens
&lt;br&gt;are NOT there.
&lt;br&gt;As with all lookarounds, it is zero-width - it matches only a position
&lt;br&gt;not actual characters. That is perhaps the key to understanding how
&lt;br&gt;they work - that no characters are ever consumed by a lookaround, but
&lt;br&gt;they still must match against the characters that follow the current
&lt;br&gt;position.
&lt;br&gt;&lt;br&gt;Since we're dealing with a position, we need a preceeding character to
&lt;br&gt;actually proceed with the match
&lt;br&gt;For example x (?! y ) will match any x that is not followed a y (but
&lt;br&gt;it will match only the x and will continue checking the rest of the
&lt;br&gt;pattern from the next character).
&lt;br&gt;&lt;br&gt;Since I mentioned the non-capturing (?: x ) above, I'll point out that
&lt;br&gt;this command is implicit in all lookarounds - they do not capture
&lt;br&gt;their contents for backreferences.
&lt;br&gt;&lt;br&gt;&lt;br&gt;So, to put all that together, what all this (?: [^/] | &amp;nbsp;/ (?! td&amp;gt; ) )
&lt;br&gt;is actually saying is:
&lt;br&gt;Look for anything that is not a slash OR if you do find a slash only
&lt;br&gt;accept it if it is not followed by the characters &amp;quot;td&amp;gt;&amp;quot;, and when you
&lt;br&gt;find either of these don't bother remembering it and just move on.
&lt;br&gt;&lt;br&gt;Or, put simpler, &amp;quot;if you find /td&amp;gt; in this section then stop trying to match&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Hopefully all of that makes sense? Feel free to ask if any part is unclear. :)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Peter Boughton
&lt;br&gt;//hybridchill.com
&lt;br&gt;//blog.bpsite.net
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;203748912;27390454;j&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;203748912;27390454;j&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1174&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1174&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Find-a-table-cell-containing-an-image-tag.-tp19189981p19208190.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19207420</id>
	<title>Re: Find a table cell containing an image tag.</title>
	<published>2008-08-28T12:24:33Z</published>
	<updated>2008-08-28T12:24:33Z</updated>
	<author>
		<name>Ian Skinner-3</name>
	</author>
	<content type="html">Peter Boughton wrote:
&lt;br&gt;&amp;gt; Just replace &amp;lt;img([^&amp;gt;]*[^/])&amp;gt; with &amp;lt;img\1/&amp;gt; and not worry about the tables?
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;The main reason is that the fix I'm using is to remove the images, since 
&lt;br&gt;they are irrelevant and unavailable to this conversion exercise. &amp;nbsp;I 
&lt;br&gt;could make them compliant and ignore them. &amp;nbsp;But since this is more a 
&lt;br&gt;learning exercise then anything, I wanted to see if I could match the 
&lt;br&gt;entire &amp;lt;td...&amp;gt; block and remove it, since without the &amp;lt;img...&amp;gt; tag the 
&lt;br&gt;cells would be empty.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Well, with a known set of source data that's fine, but potentially
&lt;br&gt;&amp;gt; that could match &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[stuff]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;img/&amp;gt;&amp;lt;/td&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; That's why the more general solution needs the negative lookahead for
&lt;br&gt;&amp;gt; /td&amp;gt; - to make sure that any img found is still within the opening
&lt;br&gt;&amp;gt; table cell.
&lt;br&gt;&amp;gt; The non-greedy matching (.*?) is not smart enough to do that for you.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hope this all helps. :)
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;It did, but could somebody parse the regex syntax for me in plain 
&lt;br&gt;English. &amp;nbsp;I can say I could only understand about half of it on sight.
&lt;br&gt;&amp;lt;td[^&amp;gt;]*&amp;gt;(?:[^/]|/(?!td&amp;gt;))*&amp;lt;img[^&amp;gt;].*?&amp;lt;/td&amp;gt;
&lt;br&gt;&lt;br&gt;The main features I do not grok is the what role the [^&amp;gt;] plays and how 
&lt;br&gt;to interpret this part in front of the negative look behind; ?:[^/]/
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;203748912;27390454;j&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;203748912;27390454;j&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1173&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1173&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Find-a-table-cell-containing-an-image-tag.-tp19189981p19207420.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19201141</id>
	<title>Re: Find a table cell containing an image tag.</title>
	<published>2008-08-28T06:57:32Z</published>
	<updated>2008-08-28T06:57:32Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">&amp;gt; the reason I'm looking for these &amp;lt;img...&amp;gt;
&lt;br&gt;&amp;gt; tags, is because they are not XHTML compliant and I needed to fix that
&lt;br&gt;&amp;gt; so that I could get this HTML fragment into an acceptable XML mode.
&lt;br&gt;&lt;br&gt;So, why are you worrying about the tables if it's the image tags that
&lt;br&gt;are the issue?
&lt;br&gt;&lt;br&gt;Just replace &amp;lt;img([^&amp;gt;]*[^/])&amp;gt; with &amp;lt;img\1/&amp;gt; and not worry about the tables?
&lt;br&gt;&lt;br&gt;&lt;br&gt;I believe there are some XPath processors that can handle non-XML
&lt;br&gt;HTML, but only because I've read a couple of references to such -
&lt;br&gt;couldn't give any examples/recommendations.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; With a great deal of trial and error I finally came up with this.
&lt;br&gt;&amp;gt; &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;.*?(?=&amp;lt;img).*?&amp;lt;/td&amp;gt;
&lt;br&gt;&lt;br&gt;Well, with a known set of source data that's fine, but potentially
&lt;br&gt;that could match &amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;[stuff]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;img/&amp;gt;&amp;lt;/td&amp;gt;
&lt;br&gt;&lt;br&gt;That's why the more general solution needs the negative lookahead for
&lt;br&gt;/td&amp;gt; - to make sure that any img found is still within the opening
&lt;br&gt;table cell.
&lt;br&gt;The non-greedy matching (.*?) is not smart enough to do that for you.
&lt;br&gt;&lt;br&gt;Hope this all helps. :)
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;203748912;27390454;j&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;203748912;27390454;j&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1172&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1172&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Find-a-table-cell-containing-an-image-tag.-tp19189981p19201141.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19200517</id>
	<title>Re: Find a table cell containing an image tag.</title>
	<published>2008-08-28T06:27:44Z</published>
	<updated>2008-08-28T06:27:44Z</updated>
	<author>
		<name>Ian Skinner-3</name>
	</author>
	<content type="html">Peter Boughton wrote:
&lt;br&gt;&amp;gt; Can you elaborate on the context of what you're trying to do here?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Because stuff like this is generally much much simpler with either
&lt;br&gt;&amp;gt; XPath or jQuery.
&lt;br&gt;Yeah, XPath would be nice but the reason I'm looking for these &amp;lt;img...&amp;gt; 
&lt;br&gt;tags, is because they are not XHTML compliant and I needed to fix that 
&lt;br&gt;so that I could get this HTML fragment into an acceptable XML mode.
&lt;br&gt;&lt;br&gt;With a great deal of trial and error I finally came up with this.
&lt;br&gt;&amp;lt;td align=&amp;quot;center&amp;quot;&amp;gt;.*?(?=&amp;lt;img).*?&amp;lt;/td&amp;gt;
&lt;br&gt;&lt;br&gt;Luckily in this HTML string, the image &amp;lt;td..&amp;gt; blocks are the only ones 
&lt;br&gt;with the align=&amp;quot;center&amp;quot; property.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;203748912;27390454;j&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;203748912;27390454;j&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1171&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1171&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Find-a-table-cell-containing-an-image-tag.-tp19189981p19200517.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19191240</id>
	<title>Re: Find a table cell containing an image tag.</title>
	<published>2008-08-27T15:43:24Z</published>
	<updated>2008-08-27T15:43:24Z</updated>
	<author>
		<name>Peter Boughton</name>
	</author>
	<content type="html">&amp;gt; This is probably one of those look ahead|behind things that I still do
&lt;br&gt;&amp;gt; not grasp about regex.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I want to find &amp;lt;td...&amp;gt; tags in a string of HTML that contain an &amp;lt;img...&amp;gt;
&lt;br&gt;&amp;gt; tag. &amp;nbsp; But I need the entire &amp;lt;td..&amp;gt;...&amp;lt;img...&amp;gt;...&amp;lt;/td&amp;gt; string to replace
&lt;br&gt;&amp;gt; it. &amp;nbsp;But I need to ignore all the other &amp;lt;td...&amp;gt;...&amp;lt;/td&amp;gt; blocks that do
&lt;br&gt;&amp;gt; not contain image tags.
&lt;br&gt;&lt;br&gt;Can you elaborate on the context of what you're trying to do here?
&lt;br&gt;&lt;br&gt;Because stuff like this is generally much much simpler with either
&lt;br&gt;XPath or jQuery.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;For example, here's how XPath matches any td containing an img:
&lt;br&gt;&lt;br&gt;//td[//img]
&lt;br&gt;&lt;br&gt;&lt;br&gt;And here's how jQuery does it:
&lt;br&gt;&lt;br&gt;$j( 'td:has(img)' )
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;To do it with RegEx, you want something like this:
&lt;br&gt;&lt;br&gt;(?ims)&amp;lt;td[^&amp;gt;]*&amp;gt;(?:[^/]|/(?!td&amp;gt;))*&amp;lt;img[^&amp;gt;]+&amp;gt;.*?&amp;lt;/td&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;So yeah, if you really have a specific need to do it with RegEx, you
&lt;br&gt;can probably use that, but I'd generally go for either of the other
&lt;br&gt;two for any tag-based issue like this.
&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;203748912;27390454;j&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;203748912;27390454;j&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1170&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1170&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Find-a-table-cell-containing-an-image-tag.-tp19189981p19191240.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-19189981</id>
	<title>Find a table cell containing an image tag.</title>
	<published>2008-08-27T14:21:34Z</published>
	<updated>2008-08-27T14:21:34Z</updated>
	<author>
		<name>Ian Skinner-3</name>
	</author>
	<content type="html">This is probably one of those look ahead|behind things that I still do 
&lt;br&gt;not grasp about regex.
&lt;br&gt;&lt;br&gt;I want to find &amp;lt;td...&amp;gt; tags in a string of HTML that contain an &amp;lt;img...&amp;gt; 
&lt;br&gt;tag. &amp;nbsp; But I need the entire &amp;lt;td..&amp;gt;...&amp;lt;img...&amp;gt;...&amp;lt;/td&amp;gt; string to replace 
&lt;br&gt;it. &amp;nbsp;But I need to ignore all the other &amp;lt;td...&amp;gt;...&amp;lt;/td&amp;gt; blocks that do 
&lt;br&gt;not contain image tags.
&lt;br&gt;&lt;br&gt;TIA
&lt;br&gt;Ian
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;203748912;27390454;j&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;203748912;27390454;j&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1169&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1169&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Find-a-table-cell-containing-an-image-tag.-tp19189981p19189981.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-18400615</id>
	<title>ANN: Reg Ex at CFDevCon</title>
	<published>2008-07-11T03:11:51Z</published>
	<updated>2008-07-11T03:11:51Z</updated>
	<author>
		<name>Cassie Glover</name>
	</author>
	<content type="html">The community based conference - CFDevCon 2008 &amp;lt;&lt;a href=&quot;http://www.cfdevcon.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cfdevcon.com&lt;/a&gt;&amp;gt; will
&lt;br&gt;be hosting a plethora of different tracks, with 3 to choose from at any one
&lt;br&gt;time. &amp;nbsp;One which may be of particular importance is Peter
&lt;br&gt;Boughton&amp;lt;&lt;a href=&quot;http://www.cfdevcon.com/speakers/PeterBoughton.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cfdevcon.com/speakers/PeterBoughton.cfm&lt;/a&gt;&amp;gt;'s
&lt;br&gt;'Introduction to Regular
&lt;br&gt;Expressions&amp;lt;&lt;a href=&quot;http://www.cfdevcon.com/schedule/Regular-Expressions.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cfdevcon.com/schedule/Regular-Expressions.cfm&lt;/a&gt;&amp;gt;'
&lt;br&gt;and for the more advanced amongst you 'Advanced Regular
&lt;br&gt;Expressions&amp;lt;&lt;a href=&quot;http://www.cfdevcon.com/schedule/Regular-Expressions-2.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cfdevcon.com/schedule/Regular-Expressions-2.cfm&lt;/a&gt;&amp;gt;'.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Come along and experience this coldfusion-centric innovative conference.
&lt;br&gt;&lt;br&gt;Book now at &lt;a href=&quot;http://www.cfdevcon.com/register.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.cfdevcon.com/register.cfm&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Cassie Glover
&lt;br&gt;Event Organiser
&lt;br&gt;TalkWebSolutions Limited
&lt;br&gt;:: We mind your business ::
&lt;br&gt;&lt;br&gt;W: &lt;a href=&quot;http://www.talkwebsolutions.co.uk&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.talkwebsolutions.co.uk&lt;/a&gt;&lt;br&gt;T: 44 (0)8452 571870
&lt;br&gt;M: 44 (0)7968 863583
&lt;br&gt;Remember if you print this out - recycle it!
&lt;br&gt;&lt;br&gt;This e-mail may contain privileged and confidential information and/or
&lt;br&gt;copyright material and is intended for the use of the addressee only. If you
&lt;br&gt;receive this e-mail in error please advise the sender immediately by using
&lt;br&gt;the reply facility in your e-mail software and delete this e-mail from your
&lt;br&gt;computer system. You may not deliver, copy or disclose its contents to
&lt;br&gt;anyone else. Any unauthorised use may be unlawful. Any views expressed in
&lt;br&gt;this e-mail are those of the individual sender and may not necessarily
&lt;br&gt;reflect the views of TalkWebSolutions Limited or its subsidiary companies.
&lt;br&gt;&lt;br&gt;&lt;br&gt;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
&lt;br&gt;Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
&lt;br&gt;Get the Free Trial
&lt;br&gt;&lt;a href=&quot;http://ad.doubleclick.net/clk;203748912;27390454;j&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://ad.doubleclick.net/clk;203748912;27390454;j&lt;/a&gt;&lt;br&gt;&lt;br&gt;Archive: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1160&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1160&lt;/a&gt;&lt;br&gt;Subscription: &lt;a href=&quot;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/groups/RegEx/subscribe.cfm&lt;/a&gt;&lt;br&gt;Unsubscribe: &lt;a href=&quot;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.21&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ANN%3A-Reg-Ex-at-CFDevCon-tp18400615p18400615.html" />
</entry>

</feed>
