You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

inrex

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inrex

Regular expressions as infix operations

1.1.1
pipPyPI
Maintainers
1

from inrex import match, search, split, findall, finditer

if 'asd 123' |match| r'(\w+) (\d+)': print 'word is', match[0] print 'digit is', match[1]

if 'asd 123' |match| r'(?P\w+) (?P\d+)': print 'word is', match['word'] print 'digit is', match['digit']

print 'asd 123 qwe 456' |findall| r'\d+' print 'asd 123 qwe 456' |split| r'\d+' print 'asd 123 qwe 456' |split(maxsplit=1)| r'\d+'

Keywords

regexp regular expressions infix operations operators

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