You can either use lookbehind (not in Javascript):
(?<=cID=)[^&]*
Or you can use grouping and grab the first group:
cID=([^&]*)
More Related Contents:
- How do I get the YouTube video ID from a URL?
- Detect URLs in text with JavaScript
- Regular expression for URL validation (in JavaScript)
- How to extract base URL from a string in JavaScript?
- Regular Expression – Extract subdomain & domain
- jQuery Youtube URL Validation with regex
- RegEx to match stuff between parentheses
- REGEX: Capture Filename from URL without file extension
- Extract parameter value from url using regular expressions
- Extract keyword from Google search in Javascript
- Alternation operator inside square brackets does not work
- regex.test V.S. string.match to know if a string matches a regular expression
- Regular expression not working for at least one European character
- Regular expression to match A, AB, ABC, but not AC. (“starts with”)
- List of all characters that should be escaped before put in to RegEx?
- Match any non-word character (excluding diacritics)
- In a regular expression, match one thing or another, or both
- (*SKIP)(*FAIL) workaround in JavaScript RegExp
- Regular expression to validate US phone numbers? [duplicate]
- Regex to grab strings between square brackets
- parsings strings: extracting words and phrases [JavaScript]
- JavaScript: indexOf vs. Match when Searching Strings?
- Javascript reg ex to match whole word only, bound only by whitespace
- Regex to accept alphanumeric and some special character in Javascript? [closed]
- How to remove invalid UTF-8 characters from a JavaScript string?
- Javascript regular expression for punctuation (international)?
- Can you retrieve multiple regex matches in JavaScript?
- Checking a Url in Jquery/Javascript
- How do I check for vowels in JavaScript?
- How to properly escape characters in regexp