https://github.com/ypsman/py-replaceall
Pip Module to replace or remove one or more Chars from a given string.
https://github.com/ypsman/py-replaceall
python python-3 python-module replaceall
Last synced: 7 months ago
JSON representation
Pip Module to replace or remove one or more Chars from a given string.
- Host: GitHub
- URL: https://github.com/ypsman/py-replaceall
- Owner: ypsman
- License: gpl-3.0
- Created: 2017-06-03T20:06:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-03T20:14:55.000Z (almost 9 years ago)
- Last Synced: 2025-07-23T18:56:06.657Z (8 months ago)
- Topics: python, python-3, python-module, replaceall
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
replaceall
**********
replaceall is a Python 2.7/3 module to replace
or remove one or more Chars from a given string.
Installation
============
$ pip install replaceall
or
$ easy_install replaceall
Usage & Example
===============
remove single Char
.. code-block:: python
from replaceall import replaceall
name = replaceall("John Doe!", "!")
print(name)
"John Doe"
replace Chars
.. code-block:: python
from replaceall import replaceall
name = replaceall("John Doe#", "#", "!")
print(name)
"John Doe!"
also works with Lists
.. code-block:: python
from replaceall import replaceall
replaceCharlist = ["!","@", "#"]
name = replaceall("John@Doe#.foo", replaceCharlist, ".")
print(name)
"John.Doe.foo"