Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8612301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:35:34+00:00 2026-06-12T04:35:34+00:00

I have tried to change this regular expression to case-sensitive with a lot of

  • 0

I have tried to change this regular expression to case-sensitive with a lot of possible solutions (/[u=|&l=|&dl=|&f=]/i and so on) but I didn’t make it to work as I want to.

u=, &l=, &dl=, and &f= is taken from profile-photos.php?u=edgren&dl=. I use this regular expression to only get the username edgren and identify those other GETs (l, dl, and f) for example;

Looking at <a href="'.url('user/'.$profile).'">'.properize($profile).'</a> '.(isset($_GET['l']) ? 'likes' : (isset($_GET['dl']) ? 'dislikes' : 'favorites')) which prints “Looking at edgrens dislikes” with the URL profile-photos.php?u=edgren&dl=.

The regular expression I have now, prints egren (example at regexpal.com) if the GET is &dl= which is wrong. I want to print the whole username and not the half of it, so to speak.

How can I fix my problem?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T04:35:36+00:00Added an answer on June 12, 2026 at 4:35 am

    You are confusing alternation with character classes. If you want to match one of several strings, use round brackets: (u=|&l=|&dl=|&f=). Square brackets are for character classes (which have the meaning “match one character if it is one of those specified between these square brackets”).

    Also i makes the regex explicitly case-insensitive.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anything I have tried didn't work. Currenly I have following code to change asp.net
I have links like these that I want to change: mypage.com?page=missions&id=5 mypage.com?page=hello I tried
Have tried to find solutions for this and can't really come up with anything.
I have tried searching over the internet about this problem but not able to
I have the following Regular Expression which matches an email address format: ^[\w\.\-]+@([\w\-]+\.)+[a-zA-Z]+$ This
I have tried to use the Notepad++ Search/Replace with a Regular Expression to replace
How can I change the following regular expression to make empty values (a.k.a String.Empty)
I thought this code would work, but the regular expression doesn't ever match the
I am using Eclipse 3.4.1 Build M20080911-1700 I have tried to change the classpath
How to change cell background image on click on cell in iphone????I have tried

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.