Solved

Replace in sql injection script

Posted on 2011-09-20
3
282 Views
Last Modified: 2012-05-12
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
Comment
Question by:MickeC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:pateljitu
ID: 36567127
Try this, uCase will convert string to UPPERCASE which will help replace function:

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

Author Comment

by:MickeC
ID: 36567329
Thanks, but the the rest of the string also be in uppercase not just the word CAST.
0
 
LVL 15

Accepted Solution

by:
pateljitu earned 500 total points
ID: 36567964
That is correct, try this please:

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

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
One field not displaying content (ASP Classic) 8 42
alert(innerHTML); 8 44
Display if field is NOT "" or NOT null 6 37
SP result not being displayed 5 69
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question