Python re Module - Use Regular Expressions with Python - Regex Support

/*--- holy mAcar00ns!! --- */

Python re Module - Use Regular Expressions with Python - Regex Support: "re.sub(regex, replacement, subject) performs a search-and-replace across subject, replacing all matches of regex in subject with replacement. The result is returned by the sub() function. The subject string you pass is not modified."

The other option is to use the sub() function:

sub( replacement, string[, count = 0])
Returns the string obtained by replacing the leftmost non-overlapping occurrences of the RE in string by the replacement replacement. If the pattern isn't found, string is returned unchanged.
The optional argument count is the maximum number of pattern occurrences to be replaced; count must be a non-negative integer. The default value of 0 means to replace all occurrences.

all your bases ar--

ping moi pleeez


About this entry

pacman is coming

nuck nuck

e belong to us!