-
Practice>Python>Regex and Parsing>Re.start() & Re.end()hackerrank.com 2019. 4. 4. 12:43728x90
Re.start() & Re.end()
Problem Link : https://www.hackerrank.com/challenges/re-start-re-end/problem
Difficulty : Easy
Tip
- re.search() start() and end() methods are described in problme description
- re.finditer() is a key method, as it return all occurences which is matched with given regular expression
- start() == end() from re.finditer()
- start() != end() from re.search()
- So, we should use start() and start() + len(k) -`1
Solution
728x90'hackerrank.com' 카테고리의 다른 글
Practice>Python>Regex and Parsing>Validating Roman Numerals (0) 2019.04.11 Practice>Python>Regex and Parsing>Regex Substitution (0) 2019.04.09 Practice>Python>Regex and Parsing>Re.findall() & Re.finditer() (0) 2019.04.03 Practice>Python>Regex and Parsing>Group(), Groups() & Groupdict() (0) 2019.03.29 Practice>Python>Regex and Parsing>Re.split() (0) 2019.03.29