|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
problems with rereplace
I'd like to replace many single quotes to two single quotes.
so: ''' to '' '''' to '' ''''''''''''''''''''''''''' to '' how do i do this with rereplace or any other method? thanks |
|
#2
|
||||
|
||||
|
Is there a space at the beginning of the set of ''''s or anything else that is the same?
I would think you would look the space and then your first '; then count the number of times you see the ' and then delete that number. Either that or do a loop, that starts at the space before the to (Is there always a space before the to?) and counts backwards until it doesn't see the '''s any more. Either way seems a bit convoluted. ![]()
__________________
Forget Milk! Gotspy? www.gotspy.com |
|
#3
|
|||
|
|||
|
This should work:
<cfset teststring = "Some single quotes: and one ' and two '' and three ''' and four ''''."> <cfset teststring = reReplaceNoCase( teststring, "[']{3,}", "''", "All" )> <cfoutput>#testString#</cfoutput> |
|
#4
|
|||
|
|||
|
Kiteless,
It worked perfectly! Thanks! :-) |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > problems with rereplace |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|