Theoretical computer science and formal language theory use regular expression as a string searching algorithm .
A regular expression , regex or regexpWhat Regular Expressions Are Exactly - Terminology ( sometimes called a rational expression ) is , in theoretical computer science and formal language theory , a sequence of characters that define a search pattern , mainly for use in pattern matching with strings , or string matching , i.e . `` find and replace '' -like operations .
Regular expression