fork download
  1. import re
  2.  
  3. txt = '''Automatic face localisation is the prerequisite step of facial image analysis for many applications such as facial attribute (e.g. expression [64] and age [38]) and facial identity
  4. ... recognition [45, 31, 55, 11]. A narrow definition of face localisation may refer to traditional face detection [53, 62],
  5. ... '''
  6.  
  7. print (re.findall(r'\[\d{1,3}(?:, *\d{1,3})*]',txt))
Success #stdin #stdout 0.02s 9492KB
stdin
Standard input is empty
stdout
['[64]', '[38]', '[45, 31, 55, 11]', '[53, 62]']