while's are of course easier to learn, but regex is far more powerful than any while loop and is definitely worth learning imo