Author |
Topic |
|
fishsticks
New Member
USA
77 Posts |
Posted - 11 January 2005 : 18:11:34
|
I want to be able to filter out certain things from a string, such as javascript. Say I want to filter "onLoad=" from a string. I would do this:
Replace(mystring,"onLoad=","")
But someone could easily do this instead:
OnLoAd=
And they win. How can I replace any combination of capital letters? |
http://www.sharredprism.com
My website! |
|
Podge
Support Moderator
Ireland
3775 Posts |
|
DavidRhodes
Senior Member
United Kingdom
1222 Posts |
Posted - 11 January 2005 : 19:15:05
|
Replace(LCase(mystring),"onload=","")
will work |
The UK MkIVs Forum |
|
|
-gary
Development Team Member
406 Posts |
Posted - 11 January 2005 : 21:49:01
|
Either use instr to determine the start and end of your search string and use mid to remove it, or use a regex. RegEx is much simpler. |
KawiForums.com
|
|
|
fishsticks
New Member
USA
77 Posts |
Posted - 12 January 2005 : 00:33:58
|
quote: Originally posted by DavidRhodes
Replace(LCase(mystring),"onload=","")
will work
I tried that same thing with UCase and ONLOAD, and that didn't work. Theoretically this would have the same effect...?
quote: Originally posted by -gary
Either use instr to determine the start and end of your search string and use mid to remove it, or use a regex. RegEx is much simpler.
How do you do such a thing?
Thank you all for your replies. |
http://www.sharredprism.com
My website! |
|
|
Doug G
Support Moderator
USA
6493 Posts |
|
|
Topic |
|