🔣
Regex Strip
Python23 lines· A small demonstration that reimplements Python's str.strip() method using regular expressions to remove leading and trailing whitespace.
Original project by @ibra-kdbra — view source on GitHubReady when you are
Regex Strip
A small demonstration that reimplements Python's str.strip() method using regular expressions to remove leading and trailing whitespace.
How to run
python regex-strip.py
Dependencies
Standard library only (uses re).
Pyodide-runnable
Yes - it is pure-stdlib code using only the re module and print.
regex-strip.py· Python 3.x
23 linesConsole· terminal