šŸš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more →
Socket
Book a DemoInstallSign in
Socket

rer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rer

Regular expression in regular expression

1.1.2
PyPI
Maintainers
1

━━━━━━━━ README ━━━━━━━━

Table of Contents ─────────────────

1 rer 2 Install 3 All in one simple function

1 rer ═════

Regular expression in regular expression.

2 Install ═════════

`pip install rer'

3 All in one simple function ════════════════════════════

ā”Œā”€ā”€ā”€ā”€ │ import re │ │ version = '1.1.2' │ author = 'Meme Kagurazaka' │ license = 'Public Domain' │ │ │ def rer(re_string, re_group=0, │ item_continuation=lambda _: _, list_continuation=lambda _: , │ re_continuation=None): │ """rer atom │ │ This function use regular expression string re_string' and the group │ re_group' (default 0) to match the data'. This will evaluates a list, │ a function re_continuation' will apply to every match of the list, │ a function list_continuation' will apply to the list. list_continuation' │ does nothing by default. │ │ re_continuation' applies item_continuation' to re_group' by default. │ │ Return value is a function which can be apply to the data'. │ Return value can also be used as a item_continuation' or │ list_continuation' of another rer recursively. │ """ │ │ if re_continuation is None: │ re_continuation = lambda : item_continuation(.group(re_group)) │ │ return lambda x: list_continuation( │ [re_continuation() for _ in re.compile(re_string).finditer(x)]) └────

Keywords

Nested regular expression re

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts