Metadata-Version: 2.1
Name: combine-re-compile
Version: 0.0.3
Summary: combine re compile
Home-page: https://github.com/landybird/combine_re_compile
Author: landybird
Author-email: 1442172978@qq.com
License: UNKNOWN
Description: # 任意组合 re.compile 
        
        [![PyPI version](https://badge.fury.io/py/combine-re-compile.svg)](https://pypi.org/project/combine-re-compile/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
        
        
        > 兼容环境
        
        `Windows`/`Linux`/`MacOs`
        
        <br>
        
        ### 1 安装
        
        > pip 安装
        ```
        $ pip install combine_re_compile
        ```
        
        > 源码安装
        ```
         $ git clone https://github.com/landybird/combine_re_compile.git
         $ cd combine_re_compile
         $ python setup.py install
         ```
        
        <br>
        
        ### 2 使用
        
        
        ```python
        
        
        DIGIT_PATTERN = re.compile(r"""
            (?P<my_digit_pattern>        # start named group
              \d+                        # 1 or more integers
            )                            # close named group
            """, re.VERBOSE)
        
        
        
        CHAR_PATTERN = re.compile(r"""
            (?P<my_char_pattern>         # start named group
              [a-z]                      # a character
            )                            # close named group
            """, re.VERBOSE)
        
        
        CHARS_PATTERN = re.compile(r"""
            (?P<my_char_pattern>         # start named group
              [a-z]+                     # a character
            )                            # close named group
            """, re.VERBOSE)
        
        
        r = CombinationPattern(DIGIT_PATTERN, CHAR_PATTERN, new_pattren_name="my_new_pattern").get_new_pattern
        
        s = "213213as2312"
        print(r.search(s).group('my_new_pattern')) # 分组名称
        
        >> 213213a
        
        ```
        
        
        
        ### License
        
        MIT [©landybird](https://github.com/landybird)
        
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
