In: Computer Science
Regular expressions are used in Python for describing and identifying specific patterns. In Python, we use “re” or “Regex” to denote regular expressions.
Definitions are useful to the extent they serve a purpose. So, is defining analytics important?
Yes and no. It’s not likely that we’ll ever arrive at a conclusive definition of analytics, but discussing what is and isn’t within its realm provides cohesive boundaries; boundaries that can help analytics emerge as an academic discipline, a field of business or a career. We cogently talk about mathematics even though it covers many varied topics. Analytics hasn’t quite reached that point. Understanding its boundaries can help people considering analytics appreciate what they’re getting into. In particular, it can help companies wanting to pursue analytics understand what will work best in their business. This is especially important given that the growth of analytics is leading consultants and software vendors, many of whom don’t fully grasp what analytics can offer, to jump into the fray.
Source: http://analytics-magazine.org/profit-center-what-is-analytics/
code:
import re
def main():
text = '''Definitions are useful to the extent they serve a purpose. So, is defining analytics important?
Yes and no. It’s not likely that we’ll ever arrive at a conclusive definition of analytics, but discussing what is and isn’t within its realm provides cohesive boundaries; boundaries that can help analytics emerge as an academic discipline, a field of business or a career. We cogently talk about mathematics even though it covers many varied topics. Analytics hasn’t quite reached that point. Understanding its boundaries can help people considering analytics appreciate what they’re getting into. In particular, it can help companies wanting to pursue analytics understand what will work best in their business. This is especially important given that the growth of analytics is leading consultants and software vendors, many of whom don’t fully grasp what analytics can offer, to jump into the fray.'''
matches = re.findall("analytics",text,re.IGNORECASE)
print("Analytics word matches :")
for match in matches:
print(match)
print("Total number of analytics words present in text : ",len(matches))
main()