Skip to content

Pip Module to replace or remove one or more Chars from a given string.

License

Notifications You must be signed in to change notification settings

ypsman/py-replaceall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

from replaceall import replaceall
name = replaceall("John Doe!", "!")
print(name)
"John Doe"

replace Chars

from replaceall import replaceall
name = replaceall("John Doe#", "#", "!")
print(name)
"John Doe!"

also works with Lists

from replaceall import replaceall
replaceCharlist = ["!","@", "#"]
name = replaceall("John@Doe#.foo", replaceCharlist, ".")
print(name)
"John.Doe.foo"

About

Pip Module to replace or remove one or more Chars from a given string.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published