You can add ‘i’ modifier that means “ignore case”
var results = new RegExp('[\\?&]' + name + '=([^&#]*)', 'i').exec(window.location.href);
More Related Contents:
- Javascript Array – Split string at numbers [closed]
- What’s the best way to validate an email address in JavaScript?
- Why do regex constructors need to be double escaped?
- Why this javascript regex doesn’t work?
- How do I get the YouTube video ID from a URL?
- How can I match overlapping strings with regex?
- Get Substring between two characters using javascript
- Javascript Regexp dynamic generation from variables? [duplicate]
- Fastest way to check a string contain another substring in JavaScript?
- Check if a string is html or not
- How to test valid UUID/GUID?
- Capture value out of query string with regex?
- Get URL from background-image Property
- Regular expression for all printable characters in JavaScript
- Regex currency validation
- Wrap tags around http text
- regex street address match
- regex javascript to match both RGB and RGBA
- jQuery Youtube URL Validation with regex
- Replace function not replacing [duplicate]
- Trim spaces from start and end of string
- Include Arabic characters in JavaScript regular expression?
- Replace certain arabic words in text string using Javascript
- What does the “Nothing to repeat” error mean when using a regex in javascript?
- Is there a way to measure string similarity in Google BigQuery
- Use RegExp to match a parenthetical number then increment it
- What’s different between Python and Javascript regular expressions?
- Extract keyword from Google search in Javascript
- Regex matching emoticons
- Regex: only alphanumeric but not if this is pure numeric