The Python Oracle

How to input a regex in string.replace?

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Puzzle Game Looping

--

Chapters
00:00 Question
01:00 Accepted answer (Score 807)
02:02 Answer 2 (Score 57)
02:16 Answer 3 (Score 30)
03:06 Answer 4 (Score 17)
03:23 Thank you

--

Full question
https://stackoverflow.com/questions/5658...

Accepted answer links:
[www.regular-expressions.info]: http://www.regular-expressions.info/

Answer 2 links:
[re.sub()]: http://docs.python.org/library/re.html#r...

Answer 3 links:
[Regular Expressions Cookbook]: https://rads.stackoverflow.com/amzn/clic...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #regex #string #replace

#avk47