Open links in new tab
  1. How to match, but not capture, part of a regex? - Stack Overflow

    The key observation here is that when you have either "apple" or "banana", you must also have the trailing hyphen, but you don't want to match it. And when you're matching the blank string, …

  2. If two cells match, return value from third - Stack Overflow

    Oct 15, 2014 · =INDEX(B:B,MATCH(C2,A:A,0)) I should mention that MATCH checks the position at which the value can be found within A:A (given the 0, or FALSE, parameter, it looks only for …

  3. Checking password match while typing - Stack Overflow

    Mar 15, 2012 · I have a registration form with "password" and "confirm password" input fields. I want to check if the "confirm password" matches the "password" while the user is typing it and …

  4. Regular expression to stop at first match - Stack Overflow

    Dec 1, 2012 · you can match. a[^ab]*b i.e specify a character class which excludes the starting and ending delimiiters. In the more general case, you can painstakingly construct an …

  5. What is the difference between re.search and re.match?

    Jun 5, 2023 · If zero or more characters at the beginning of string match the regular expression pattern, return a corresponding MatchObject instance. Return None if the string does not …

  6. regex - Python extract pattern matches - Stack Overflow

    Mar 11, 2013 · import re s = #that big string # the parenthesis create a group with what was matched # and '\w' matches only alphanumeric charactes p = re.compile("name +(\w+) +is …

  7. regex - Match groups in Python - Stack Overflow

    Is there a way in Python to access match groups without explicitly creating a match object (or another way to beautify the example below)? Here is an example to clarify my motivation for …

  8. Regex match any single character (one character only)

    Jul 2, 2022 · Use the dot. character as a wildcard to match any single character. Example regex: a.c. abc // match a c // match azc // match ac // no match abbc // no match Match any specific …

  9. python - How do I sum values in a column that match a given …

    Jan 30, 2015 · Suppose I have a dataframe like so: a b 1 5 1 7 2 3 1 3 2 5 I want to sum up the values for b where a = 1, for example. This would give me 5 + 7 + 3 = 15. How do I do this in …

  10. How do you extract the value of a regex backreference/match in ...

    The problem with the code you are typing is that select-string does not pass down the actual Regex object. Instead it passes a different class called MatchInfo which does not have the …