[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Case Insensitive

Posted on 1998-11-15
3
Medium Priority
?
210 Views
Last Modified: 2010-03-04
How do I make something case insensitive?
Say, if

$variable1 = "Hello";
$variable2 = "HELLO";

How can I tell if variable1 and variable 2 are the same, even though one is totally capitalized, and the other isn't?

Thanks,
Mark
0
Comment
Question by:eversoslightly
[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 4

Expert Comment

by:martinag
ID: 1206222
if (lc($variable1) eq lc($variable2)) {
  # I don't know is the "correct" way of doing it, but it works...
}

Martin
0
 
LVL 1

Author Comment

by:eversoslightly
ID: 1206223
Thanks!  Works great - just answer the question, and I'll give ya the points.
0
 
LVL 4

Accepted Solution

by:
martinag earned 40 total points
ID: 1206224
if (lc($variable1) eq lc($variable2)) {
  # I don't know is the "correct" way of doing it, but it works...
}

Martin
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

649 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