0

I need to make regular expression which will match string starts with '->' or '<-' and after that continue with some symbols. For example string '-> arrow 43' should be matched. I don't have much experience in working with re module so it's RegExpression I made '(<\-|\->).+'. But when I run print(re.findall('(<\-|\->).+', '-> arrow 43')) It prints me that ['->'] Why? Shouldn't it prints the whole string? Maybe I have got mistakes in a pattern?

cooleck
  • 74
  • 1
  • 2
  • 10

0 Answers0