Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"""
^\(?.*?(?P<qno>\d{1,2})[\)\.]\s? \s? A\.?\s?(?P<A>.+?) \s+ B\.?\s?(?P<B>.+?) \s+ C\.?\s?(?P<C>.+?) \s+ D\.?\s?(?P<D>.+$)
"""
gmxi

Description

提取并分组:

  • 题号
  • ABCD四个答案
Submitted by anonymous - 3 years ago (Last modified 3 years ago)