Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search and change character

Status
Not open for further replies.

deddleston

Programmer
Oct 4, 2002
43
0
0
GB
I have a page, and it works fine, except when the % character is used.

I need to search for the % from within <% query %> anc change it in somthing that i can use. Then i need to change the charcter back into % so it will work in SQL.

Any help appreciated M$ arn't the only option!
 
How about using .indexOf method for the String object?

go to string object and you will get the complete listing of methods, including .indexOf

Although now that I think about it, I can't see why this would cause your program to mess up unless you had the &gt; after it. One method to fix script escapes (if this is what is happening) is to break up the two characters liek this:
Code:
myString = &quot;blah blah %&quot; + &quot;>&quot;

or you can use escape characters to make the system ignore certain characters and treat them like normal characters rather than special characters.

-Tarwn ________________________________________________________________________________
Sometimes it is how you ask the question: faq333-2924
Many ASP questions have already been answered, please check faq333-3048 and use the search tool before posting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top