Examples¶

  1. Example of findall

Example of findall

A quick example with method findall.

<<<

from wrapclib import re2

s = "date 0 : 14/9/2000 date 1 : 20/04/1971 "

reg = re2.compile(
    "([0-3]?[0-9]/[0-1]?[0-9]/([0-2][0-9])?[0-9][0-9])[^\d]")

fall = re2.findall(reg, s)
print(fall)

>>>

    [('14/9/2000', '20'), ('20/04/1971', '19')]

(original entry : re2.py:docstring of wrapclib.re2.re2.findall, line 10)