Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

Replace in sql injection script

Hi! I have an sql injection script that works fine. But if i want to replace one whole word by nothing and i write like this:

txtNew = replace(txtNew, "CAST", "")

Then the word CAST is replaced but you can still write cast or cAst for an example. How do i do if i want to relace the word and the relace should not care if it is a big or small letter?
0
MickeC
Asked:
MickeC
  • 2
1 Solution
 
pateljituCommented:
Try this, uCase will convert string to UPPERCASE which will help replace function:

txtNew = replace(uCase(txtNew), "CAST", "")
0
 
MickeCAuthor Commented:
Thanks, but the the rest of the string also be in uppercase not just the word CAST.
0
 
pateljituCommented:
That is correct, try this please:

txtNew = replace(txtNew, "CAST", "", 1, -1, 1)
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now