enow.com Web Search

Search results

  1. Results from the WOW.Com Content Network
  2. regex - Carets in Regular Expressions - Stack Overflow

    stackoverflow.com/questions/16944357

    When it's inside [] but not at the start, it means the actual ^ character. When it's escaped (\^), it also means the actual ^ character. In all other cases it means start of the string or line (which one is language or setting dependent). So in short: Anywhere else -> start of string or line. So ^[b-d]t$ means:

  3. OR condition in Regex - Stack Overflow

    stackoverflow.com/questions/15986187

    However, for something like your case you might want to use the ? quantifier, which will match the previous expression exactly 0 or 1 times (1 times preferred; i.e. it's a "greedy" match). Another (probably more relyable) alternative would be using a custom character group: \d+\s+[A-Z\s]+\s+[A-Z][A-Za-z]+. This pattern will match: \d+: One or ...

  4. Now available on Stack Overflow for Teams! AI features where you work: search, IDE, and chat. Learn more Explore Teams

  5. 93. ^[A-Za-z0-9_.]+$. From beginning until the end of the string, match one or more of these characters. Edit: Note that ^ and $ match the beginning and the end of a line. When multiline is enabled, this can mean that one line matches, but not the complete string. Use \A for the beginning of the string, and \z for the end.

  6. 10. It means match any characters that are not printing characters. Printing characters include a to z, A to Z, 0 to 9 and symbols such as ",;$#% etc. ^ not. \x20 hex code for space character. - to. \x7e hex code for ~ (tilde) character. All the ascii printing characters fall between these two. This statement matches non ascii characters as ...

  7. I'm finding a regular expression which adheres below rules. Allowed Characters. Alphabet : a-z / A-Z

  8. If you need to match nested parentheses, you may see the solutions in the Regular expression to match balanced parentheses thread and replace the round brackets with the square ones to get the necessary functionality. You should use capturing groups to access the contents with open/close bracket excluded:

  9. Yes, the first means "match all strings that start with a letter", the second means "match all strings that contain a non-letter". The caret ("^") is used in two different ways, one to signal the start of the text, one to negate a character match inside square brackets. answered May 7, 2010 at 18:31.

  10. Regex that accepts only numbers (0-9) and NO characters

    stackoverflow.com/questions/19715303

    Your regex ^[0-9] matches anything beginning with a digit, including strings like "1A". To avoid a partial match, append a $ to the end: ^[0-9]*$. This accepts any number of digits, including none. To accept one or more digits, change the * to +. To accept exactly one digit, just remove the *.

  11. 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. As a result, when a match finally happens, a greedy repetition would match as many reps as possible.