ColdFusion Builder Extension: Regular Expression Find And Replace

Posted December 3, 2009 at 10:26 AM by Ben Nadel

Tags: ColdFusion

I know that ColdFusion Builder and the Eclipse platform already have regular-expression-based find and replace support; but, coming from the HomeSite world, I know what it's like to have really usable find and replace support (oh snap! buuuuurrrn!). As such, I figured I would try to extend the built-in find and replace functionality with ColdFusion Builder's ColdFusion-based extension mechanism. Working on it last night and this morning, here is what I came up with. It only works with one file at a time (no extended find/replace yet), but the interface is much more reminiscent of HomeSite.


 
 
 

 
ColdFusion Builder Extension: Regular Expression Find And Replace Video Preview.  
 
 
 

There's too much code involved to show it in this blog post, so I have created a ColdFusion Builder Extension: RegEx Find And Replace project in my projects area. I already have a number of ideas that I want to add to this; but, if you have anything you'd like to see me add, please leave a comment below.



Reader Comments

Dec 3, 2009 at 1:01 PM // reply »
51 Comments

Awesome stuff Ben! ColdFusion builder is going to make my favorite IDE event better! I am loving the extensions that have already come out and excited to see what talented people like yourself come up with!


Dec 3, 2009 at 2:19 PM // reply »
11,243 Comments

@Dan,

Yeah, the extension stuff is exciting. I have to admit, this is the first time that I personally felt the real excitement. I played around with some other stuff, but it more just felt like "fun" things; this is the first time I truly felt like I was *extending* the platform itself - I was way pumped up.


Dec 3, 2009 at 2:20 PM // reply »
51 Comments

Its no Ben Nadel Code Converter but it will do!


Dec 3, 2009 at 2:26 PM // reply »
11,243 Comments

@Dan,

Ha ha ha ha :)


Dec 3, 2009 at 11:59 PM // reply »
110 Comments

That is *really* cool. I still haven't played around at all with CF Builder, but all of the neat little extras are certainly making me more interested in trying it out.


Dec 4, 2009 at 12:23 AM // reply »
1 Comments

Really cool stuff!!


Dec 4, 2009 at 1:09 AM // reply »
2 Comments

Very cool, Ben! Very Homesite+ ish! ;)


Dec 4, 2009 at 8:04 AM // reply »
11,243 Comments

Thanks guys. Some more thoughts I had about adding to this:

* Baked-in "common use" regular expressions like:
-- Find all tags.
-- Find all tags with given name.
-- Find email addresses.

I don't know how useful that would be. BUT, to build on top of that idea, being able to save your regex patterns with names would be badass (so that they can be pulled up quickly later, say from a drop down or a modal window).

* Other non-regex functionality like being able to UPPER or lower case the matched pattern.


Dec 17, 2009 at 4:56 PM // reply »
1 Comments

Thanks for this extension and especially for the video explaining it.


Jan 5, 2010 at 9:25 AM // reply »
11,243 Comments

@Dale,

My pleasure.


Post A Comment

Comment Etiquette: Please do not post spam. Please keep the comments on-topic. Please do not post unrelated questions or large chunks of code. And, above all, please be nice to each other - we're trying to have a good conversation here.

Please review the following issues:

Author Name:


Author Email:

Author Website:

Comment:

Supported HTML tags for formatting: <strong>bold</strong>   <em>italic</em>   <code>code</code>







  • Help Wanted - Find Your Next ColdFusion Job
Ben Nadel's Company - Epicenter Consulting Recent Blog Comments
May 22, 2013 at 5:35 PM
Script Tags, jQuery, And Html(), Text() And Contents()
This is still an issue 2 years later. jQuery is supposed to remediate these cross browser issues, no? I have been unable to find any statement from the jQuery team calling this behavior "by de ... read »
May 22, 2013 at 12:44 PM
Ask Ben: Query Loop Inside CFScript Tags
In cf10, if you call a function that has: local.result = {}; local.result.msg = ""; local.svc = new query(); local.svc.setSQL("SELECT * FROM..."); local.obj = local.svc.exe ... read »
May 22, 2013 at 12:29 PM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Ben: What version of Java are you using? Also, did you test users.id to see what Java reports as the data type? I wonder if it's not a Java primitive data type, but getting returned as something ... read »
May 22, 2013 at 11:47 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Dana, Awesome - so it looks like this bug was fixed in ColdFusion 10. Thanks so much for double-checking that. ... read »
May 22, 2013 at 11:37 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
When I c&p and run on cf10, I get: Selected User IDs: 1,4 User 1 selected: YES - YES User 2 selected: NO - NO User 3 selected: NO - NO User 4 selected: YES - YES User 5 selected: NO - ... read »
May 22, 2013 at 11:27 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
@Tom, Good thought, but no dice. Both of these still exhibit the same behavior: users.id[ users.currentRow ] users[ "id" ][ users.currentRow ] It's just something whacky happening with ... read »
May 22, 2013 at 11:07 AM
Strange Interaction Between DeserializeJson(), ArrayContains(), And Database Values In ColdFusion
Could your problem be that "users.id" is actually an ARRAY, not a single value? Perhaps try it again with "users.id[1]" (I only have CF8 here at work). ... read »
May 22, 2013 at 7:52 AM
Nested Views, Routing, And Deep Linking With AngularJS
Hi, Just a quick thank you. As it happens, for my own purposes, the pending ui-router work being done in native angular is likely the one I'll adopt, but your exploration, code and documentation of ... read »
InVision App - Prototyping Made Beautiful With Prototyping Tools