Home  >  Q&A  >  body text

Python re.split的困惑

PHP中文网PHP中文网2741 days ago368

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:01:17

    • If parentheses are not added, the returned result is the groups matched by regular expressions;

    • If parentheses are added, all groups will be returned, including unmatched groups.

    The official document is very clear, I just translated it for you.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-18 10:01:17

    Explanation in python3-cookbook

    reply
    0
  • Cancelreply