so not all possible string processing tasks can be done using regular expressions there are also tasks that can be done with regular expressionsbut the expressions turn out to be very complicated in these casesyou may be better off writing python code to do the processingwhile python code will be slower than an elaborate regular expressionit will also probably be more understandable concept of regular expression you may be familiar with searching for text by pressing ctrl- and typing in the words you're looking for regular expressions go one step furtherthey allow you to specify pattern of text to search for regular expressions are helpfulbut not many non-programmers know about them even though most modern text editors and word processorssuch as microsoft word or openofficehave find and findand-replace features that can search based on regular expressions regular expressions are huge time-saversnot just for software users but also for programmers finding patterns of text without regular expressions say you want to find phone number in string you know the patternthree numbersa hyphenthree numbersa hyphenand four numbers exampleregular expressionscalled regexes for shortare descriptions for pattern of text for examplea \ in regex stands for digit character-that isany single numeral to the regex \ \ \ -\ \ \ -\ \ \ \ is used by python to match the same text the string of three numbersa hyphenthree more numbersanother hyphenand four numbers any other string would not match the \ \ \ -\ \ \ -\ \ \ \ regex but regular expressions can be much more sophisticated