|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi. i would like a regular expression to remove all weird characters like this on the line below
if you can see it. And like all those other non-english characters like the letter a with two dots on top etc etc. I have a string with some text and html code. I need to remove these junk characters from it. Please help. ![]() |
|
#2
|
|||
|
|||
|
I've found these pages helpful when dealing with regular expressions.
http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000982.htm http://www.activsoftware.com/resources/discussion/messages.cfm/id/1036 http://www.firstserv.com/support/coldfusion/documentation/coldfusion_5/Developing_ColdFusion_Applications/regexp7.html |
|
#3
|
|||
|
|||
|
I've tried various methods and there just seems no way to match those "junk" characters... never found any documentation in relation to that either.
__________________
We can help export your products http://www.GIAgroup.com/ |
|
#4
|
|||
|
|||
|
This is really a question about regular expressions and not a CF question. There are whole books and web sites about regular expressions so I'd start there, maybe with a Google search. I'm not much of a regex person myself or I'd offer a solution, but regex, as you may have guessed, can be a very advanced topic.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#5
|
|||
|
|||
|
Found a simple solution that actually works!
Code:
[^\w\s[:punct:]] Still need to test it more extensively but seems fine! Ah finally! :P For an amazing forum on regex check this out: http://regexadvice.com/forums/ Cheers! Prem |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > REReplace to remove junk characters |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|