Examples



Is the input given by the user a number?

(BTW which one is a number:  23, 2.3, .3, 2., 2.3.4.7.12, 2.4e3, abc ?)

Is there a substring in the file that is repeated 3 or more times?

Replaces all occurrences of Python or python by Java ...
... but avoid replacing Monty Python.


Given a text message fetch all the phone numbers:
Fetch numbers that look like 09-1234567
then also fetch +972-2-1234567
and maybe also 09-123-4567
but this #456 is not a phone number


Check if in a given text passing your network there are credit card numbers....


Given a text find if the word "password" is in it and fetch the surrounding text.


Given a log file like this:

[Tue Jun 12 00:01:00 2019] - (3423) - INFO - ERROR log restarted
[Tue Jun 12 09:08:17 2019] - (3423) - INFO - System starts to work
[Tue Jun 13 08:07:16 2019] - (3423) - ERROR - Something is wrong

provide statistics on how many of the different levels of log messages
were seen. Separate the log messages into files.