1.

What are regular expressions (RE)?

Answer»

Regular expressions are a specially encoded SEQUENCE of characters that helps PROGRAMMERS in defining a search pattern within the strings. They began to appear in the mid-1940s for describing regular languages. But gradually by the 1970s, they began to pop up in the programming world for searching and pattern-matching. There are numerous applications of regular expressions. Some practical day-to-day aspects are in data science, data extraction, data pre-processing, pattern matching, NATURAL language processing (NLP), web scraping, etc. 

e.g.: 

$s = "Gaurav Roy";  if ($s =~ m[Gaurav])   {      PRINT "Match Found\n";  }  else   {      print "Match Not Found\n";  } 



Discussion

No Comment Found