Metadata-Version: 2.4
Name: emi-re
Version: 0.3.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing
Classifier: Topic :: Text Processing :: General
License-File: LICENSE
Summary: Collection of regular expressions
Keywords: regular expression,regex,re
Author-email: ftnext <takuyafjp+develop@gmail.com>
License-Expression: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/ftnext/emi-re#readme
Project-URL: Issues, https://github.com/ftnext/emi-re/issues
Project-URL: Source, https://github.com/ftnext/emi-re

# emi-re

[![PyPI - Version](https://img.shields.io/pypi/v/emi-re.svg)](https://pypi.org/project/emi-re)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/emi-re.svg)](https://pypi.org/project/emi-re)

Emi-re (pronunciation: [Emily](https://millionlive-theaterdays.idolmaster-official.jp/idol/emily/)) is a collection of regular expressions encountered during OSS code reading.

-----

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

## Installation

```console
pip install emi-re
```

## Usage

CamelCase to snake_case

```python
>>> import emire
>>> emire.to_snake_case("CamelCase")
'camel_case'

```

Remove whitespaces (in Japanese)

```python
>>> import emire
>>> emire.remove_spaces("Algorithm C ないしは アルゴリズム C")
'Algorithm CないしはアルゴリズムC'
>>> import emire.normalize
>>> emire.normalize.RemoveWhitespaceNormalizer().normalize("Algorithm C ないしは アルゴリズム C")
'Algorithm CないしはアルゴリズムC'

```

Extract JSON from code block in Markdown

```python
>>> import json
>>> import emire
>>> emire.extract_json('''```json
... {
...   "key": "value",
...   "number": 123
... }
... ```''')
'{\n  "key": "value",\n  "number": 123\n}'
>>> json.loads(_)
{'key': 'value', 'number': 123}

```

## License

`emi-re` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.

