regex.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:server 作者: viur-framework 项目源码 文件源码
def regexMatch(render, pattern, string, flags = 0):
    """
    Jinja2 global: Match a string for regular expression pattern.
    This function internally runs re.match().

    :param s: String where to be searched in.
    :type s: str

    :param pattern: Regular expression pattern to be matched.
    :type pattern: str

    :param flags: Flags to be passed to re.search().
    :type flags: int

    :return: A matching object on success, else None.
    :rtype: ``re.MatchObject``
    """
    return re.match(pattern,string)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号