Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding text_replace_regex functionality #193

Merged
merged 2 commits into from Oct 28, 2015

Conversation

rgcr
Copy link
Contributor

@rgcr rgcr commented Oct 28, 2015

It works like this:

# text, regex, newtext, **kwargs
In [2]: text_replace_regex('foo\n\nbar\nxXxXx\n', r'[xo]', 'R', flags=re.IGNORECASE)
Out[2]: 'fRR\n\nbar\nRRRRR\n'

In [4]: text_replace_regex('foo\n\nbar\nxxXxXx\n', r'xx', 'R' )
Out[4]: 'foo\n\nbar\nRXxXx\n'

Regards

sebastien pushed a commit that referenced this pull request Oct 28, 2015
adding text_replace_regex functionality
@sebastien sebastien merged commit 44b79c7 into sebastien:master Oct 28, 2015
@sebastien
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants