Skip to content

Commit

Permalink
Add support for re2
Browse files Browse the repository at this point in the history
  • Loading branch information
cdown committed Jan 31, 2018
1 parent e8f1ff4 commit 180ec5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.rst
Expand Up @@ -38,6 +38,7 @@ Why choose this library?
- Tolerant of many common errors found in real-world SRT files
- Completely Unicode compliant
- `Released into the public domain`_
- Optional support for highly performant `re2`_ regex engine
- Real world tested — used in production to process thousands of SRT files
every day
- Portable — runs on Linux, OSX, and Windows
Expand Down
5 changes: 4 additions & 1 deletion srt.py
Expand Up @@ -4,10 +4,13 @@

from __future__ import unicode_literals
import functools
import re
from datetime import timedelta
import logging

try: # Optional performance boost
import re2 as re
except ImportError:
import re

log = logging.getLogger(__name__)

Expand Down

0 comments on commit 180ec5d

Please sign in to comment.