About 18,200,000 results
Open links in new tab
  1. regex - Carets in Regular Expressions - Stack Overflow

    Jun 1, 2017 · Specifically when does ^ mean "match start" and when does it mean "not the following" in regular expressions? From the Wikipedia article and other references, I've concluded it means the former at the start and the latter when used with brackets, but how does the program handle the case where the caret is at the start and at a bracket?

  2. What are ^.* and .*$ in regular expressions? - Stack Overflow

    Nov 30, 2011 · That looks like a typical password validation regex, except it has couple of errors. First, the .* at the beginning doesn't belong there.

  3. What is the difference between .*? and .* regular expressions?

    On greedy vs non-greedy. Repetition in regex by default is greedy: they try to match as many reps as possible, and when this doesn't work and they have to backtrack, they try to match one fewer rep at a time, until a match of the whole pattern is found.

  4. regex - What's the difference between () and [] in regular …

    Groups are particularly used with quantifiers that allow the preceding expression to be repeated as a whole: a*b* matches any number of a’s followed by any number of b’s, e.g. a, aaab, bbbbb, etc.; in contrast to that, (ab)* matches any number of ab’s, e.g. ab, abababab, etc.

  5. Regular Expressions: Is there an AND operator? - Stack Overflow

    You can do that with a regular expression but probably you'll want to some else. For example use several regexp and combine them in a if clause. You can enumerate all possible permutations with a standard regexp, like this (matches a, b and c in any order):

  6. Regular Expression to match valid dates - Stack Overflow

    Mar 2, 2008 · I'm trying to write a regular expression that validates a date. The regex needs to match the following. M/D/YYYY; MM/DD/YYYY; Single digit months can start with a leading zero (eg: 03/12/2008) Single digit days can start with a leading zero (eg: 3/02/2008) CANNOT include February 30 or February 31 (eg: 2/31/2008) So far I have

  7. Dollar sign in regular expression and new line character

    Dec 17, 2012 · If the pattern ends with a newline then $ usually matches before that character. That goes at least for Perl, PCRE, Java and .NET.

  8. Regular expression to allow spaces between words

    This regular expression ^\w+(\s\w+)*$ will only allow a single space between words and no leading or trailing spaces. Below is the explanation of the regular expression: ^ Assert position at start of the string \w+ Match any word character [a-zA-Z0-9_] Quantifier: + Between one and unlimited times, as many times as possible, giving back as ...

  9. How to use Regular Expressions (Regex) in Microsoft Excel both in …

    A text to use the regular expression on. A regular expression. A format string specifying how the result should look. It can contain $0, $1, $2, and so on. $0 is the entire match, $1 and up correspond to the respective match groups in the regular expression. Defaults to $0.

  10. Regular Expression - Validate Gmail addresses - Stack Overflow

    Simple regular expression for matching Gmail: ^[\w.+\-]+@gmail\.com$ Matches, if in the beginning of the string there is \w (alphanumeric or underscore character) or . or + or -, one or more times, followed by @gmail.com in the end of the string. You can test it in regexpal. By the way, is there a documentation for Regular Expression?