bbelderbos,
@bbelderbos@fosstodon.org avatar

In you can use sub() from the "re" module to do regex string replacing.

If you want to keep a count of the number of replacements done as well, you can use subn() which returns a tuple of the new (replaced) string and the number of replacements made.

For example:

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • kavyap
  • InstantRegret
  • JUstTest
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines