Solved

Compare 2 strings if string 2 has the same word in it do something

Posted on 2010-11-30
4
349 Views
Last Modified: 2013-01-20
Hello All;

I need to compare 2 string together and see if

str1 = "carrzkiss"
str2 = "iscarrzkissme"
if (str1 = str2) then
response.write"you cannot have your username in this string"
else
continue on
end if

Something like that.
This is for a password field, to keep people from reusing their username as part of their password.
0
Comment
Question by:Wayne Barron
[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
4 Comments
 
LVL 52

Expert Comment

by:Ryan Chong
ID: 34236875
0
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 500 total points
ID: 34236891
yup, instr is fine. use lcase as well

if instr(lcase(str2), lcase(str1)) > 0 then
  ' there is a case insensitive match
0
 
LVL 31

Author Closing Comment

by:Wayne Barron
ID: 34237809
Thanks Cyber.
It was the lcase that I was missing.
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 38798933
I had not used this in a while, and had forgotten about how to use it.
So thankful that I had this to look back on.
Thanks once again cyberkiwi

Carrzkiss
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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 this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

707 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