<cfloop from="1" to="#thumbs.recordCount#" index="i" step="6"> <div> <cfoutput query="thumbs" maxrows="6" startrow="#i#"> <img id="pics" src="#p2##name#" title="#rereplace(thumbs.name, 'AA[A-Z]?|_', ' ', 'ALL')#" /> </cfoutput> </div> </cfloop>
I have a collection of images:
AAA_imageOne, AAB_imageTwo, AAC_imageThree, etc.
Above I have a regular expression that replaces a range, AA[A-Z], which prefix the filename of a bunch of images. For example: AAA_imageOne, AAB_imageTwo, AAC_imageThree, etc. become imageOne, imageTwo, imageThree, etc. The underbar in the image filename is also replaced.
Some of my image names have another character within them. Here's an example:
AAG_image-twelve
I would like to replace the dash (-) with something other than a blank space. So I can't group this character into the regex currently in use. Is there a way to combine both replace function into one? All at once I would like to replace the range (AA[A-Z]), with a blank space, the underbar (_) with a blank space, and the dash (-) with something OTHER THAN a blank space.
Here is what I tried, in an attempt to replace the dash with a slash:
<cfloop from="1" to="#thumbs.recordCount#" index="i" step="6"> <div> <cfoutput query="thumbs" maxrows="6" startrow="#i#"> <img id="pics" src="#p2##name#" title="#rereplace(thumbs.name, 'AA[A-Z]?|_', ' ', 'ALL'|'-', '/', 'ALL')#" /> </cfoutput> </div> </cfloop>
I'm not sure if this is even possible. Any ideas? Thanks!

New Topic/Question
Reply




MultiQuote







|