# Path: pydal/helpers/regex.py
# REGEX_SEARCH_PATTERN = r"^{[^.]+\.[^.]+(\.(lt|gt|le|ge|eq|ne|contains|startswith|year|month|day|hour|minute|second))?(\.not)?}$"
# 
# REGEX_SQUARE_BRACKETS = r"^.+\[.+\]$"
# 
# Path: pydal/_compat.py
# PY2 = sys.version_info[0] == 2
#     def implements_bool(cls):
#     def implements_iterator(cls):
#     def to_bytes(obj, charset="utf-8", errors="strict"):
#     def to_native(obj, charset="utf8", errors="strict"):
#     def to_bytes(obj, charset="utf-8", errors="strict"):
#     def to_native(obj, charset="utf8", errors="strict"):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
# def to_unicode(obj, charset="utf-8", errors="strict"):
#     class metaclass(meta):


import re
from .regex import REGEX_SEARCH_PATTERN, REGEX_SQUARE_BRACKETS
from .._compat import long


def to_num(num):
    result = 0
    try:

# Path: pydal/helpers/regex.py
# REGEX_SEARCH_PATTERN = r"^{[^.]+\.[^.]+(\.(lt|gt|le|ge|eq|ne|contains|startswith|year|month|day|hour|minute|second))?(\.not)?}$"
# 
# REGEX_SQUARE_BRACKETS = r"^.+\[.+\]$"
# 
# Path: pydal/_compat.py
# PY2 = sys.version_info[0] == 2
#     def implements_bool(cls):
#     def implements_iterator(cls):
#     def to_bytes(obj, charset="utf-8", errors="strict"):
#     def to_native(obj, charset="utf8", errors="strict"):
#     def to_bytes(obj, charset="utf-8", errors="strict"):
#     def to_native(obj, charset="utf8", errors="strict"):
# def with_metaclass(meta, *bases):
#         def __new__(cls, name, this_bases, d):
# def to_unicode(obj, charset="utf-8", errors="strict"):
#     class metaclass(meta):


# Path: pydal/helpers/rest.py
import re
from .regex import REGEX_SEARCH_PATTERN, REGEX_SQUARE_BRACKETS
from .._compat import long



def to_num(num):
    result = 0
    try:

        result = long(num)