LOOKAHEAD and LOOKBEHIND (leading and retrospective checks)

Regular expressions in different programming languages

If simple, regularly, this is a template on which the text is filtered. We can write the template (regularly) we need and thus look in the text we need symbols, words, etc.D. They are also used, for example, when filling the e-mail field on various sites, t.e. Create a template by type: someemail@gmail.com. I took this as an example, no more. Now, having figured out what it is, let’s start studying. I promise, it will not be bored)

Where to write regularities?

We can write regularities both on special sites and using any programming language. Syntax (rules for writing regulators) is not tied to some separate programming language. Therefore, having studied regular expressions, you can use them where you want. At first, as part of the study, we will use an excellent site, and how to write regular expressions in various programming languages, we will consider a little later.

I will immediately give a link to the site so that you can already write with me https: // www.Reghextester.com/

Briefly about how to use the site. On top, in the Regular Expression column, you write regular expression itself, and under it, in the Test String column, you write a line that you want to filter. If the correspondences were found between the regular expression and the text, these correspondences will be marked in blue in the text, you will see them right away, do not even doubt them.

Visualping

Visualping is one of the best available web pages monitoring platforms, which offers intuitive functions that are suitable for both beginners and advanced users. What we liked the most in Visualizing is that it shows an integration form of monitoring right on his home page, which allows you to easily start the monitoring process.

Visualping claims that it is used by more than 1.5 million users around the world performing five billion checks. Its functions include checks of checks every five minutes or every week, checking documents such as PDF files, the selection of the screen configuration, setting up the proxy server parameters and warning parameters. In addition, all these functions are packed in a clean and neat integer, which simplifies the tracking of changes.

Individual Visualizing plans start from 13 per month for 40 checks per day or 1200 checks per month. Business planes start from 20 per month for one user for 130 checks per day or 4000 checks per month for at least 3 users with annual payment.

  • A generous free plan for individuals-2 checks per day or 65 checks per month, while business plans receive twice as much as this quota.
  • Control the visual elements of the page using Visual-Compare and receive notification using the screenshots convenient for viewing with highlighted changes.
  • Many options for a proxy server, including the basic, including the basic IP address for the country, home (activated on request) and a static random IP address for you.
  • Allows you to perform actions such as entering the page protected by password, alert of specific keywords and turning on / disabling JavaScript.
  • Additional advantages of business plans, such as advanced functions, demo versions and staff training, phone support and a special customer service manager.
  • The free plan is not as generous as some of its competitors listed below.
  • No plan allows an unlimited number of team members, unlike Versionista plans.

Versionista

Versionista is a simple but powerful tool for monitoring web pages of static and dynamic websites. You can track web pages, as well as documents such as PDF files. What distinguishes him from others is that you can install filters to exclude irrelevant changes in content, as well as manage and track changes in SEO in order to remain competitive in the search results.

When creating a monitor, you can configure the frequency, support JavaScript, the address of the proxy server and much more. What is really cool is that it shows a comparison of color codes to highlight changes and supports sending warnings about changes and detailed emails. In addition, Versionista supports team joint work, allowing administrators to manage users, and users, in turn, cooperate with each other to support command projects.

Versionista plans start from 19 per month for checking 20 URL addresses and the execution of 1860 carriers of the browser (inspections) per month. If you need to add team members and you need custom reports, Versionista plans start at 139 a month.

  • A free plan allows you to check 5 URL addresses and perform 465 browser-ons (inspections) per month for both private individuals and enterprises.
  • The monitoring panel shows the URL of the entire site for each proven URL address, which allows you to quickly add monitors for other pages on the same website.
  • Enterprise Managed Services offers individual design, integration of processes and products, analytical reports, etc. D.
  • The free plan is very limited. there is no support for advanced filters, such as page selectors and regular expressions, unlike others, such as Visualizing.
  • There is no separate set of business plans, unlike Visualping. Offers “gold” and “corporate” plans with an unlimited number of users, starting from 139 per month.
  • The Interais is slightly less intuitive than some others, such as Visualizing, for example.

Page Monitor

Distill. This is a web monitoring tool. He can track RSS channels, web page or part of the web page. Alerts can be obtained in the form of pop.up windows, audio or emails. Op.

Update Scanner

Update Scanner. Expansion Firefox for monitoring web pages for updates. Useful for websites that do not provide atom or RSS channels. Features: Choose how often every site is.

WebSite-Watcher

WebSite-Watcher detects updates of the website and selects all changes in the text. WebSite-Watcher controls web pages protected by password pages, discussion forums and much more.

Wachete

Track the changes in the web page and get a notification. free registration. Have all the data in one place.

Visualping

Visualization. This is the easiest to use monitoring changes in the website, a website for changing the website and software for changing the website on the Internet. Unlike other programs.

Changemon.com

Changemon.COM allows you to track any HTML page or RSS channel for changes. You can receive notifications that the word / phrase is added or removed from the web page, or you can.

FiveFilters Feed Creator

Webmon

Webmon. Free program for monitoring updates of web pages. This saves your time and allows you to update information automatically checking the web pages to find out if they were changed.

Web Alert

Web Alert allows you to track any website to make changes (even if a login, form or password is required to access the site). You can receive notifications when the price is cheating.

Follow That Page

Follow that Page sends you an email when your favorite web pages have changed. Free version can perform 20 daily checks and 1 hour control. You can enter any.

Versionista

Versionista was developed for modern and modern business, where subtle changes can offer effective tactical advantages. It allows you to track all websites and receive notes.

Trimgle

Web page and json monitor. This is an extension for the most modern browsers. It is used to monitor any web page, such as the price of Amazon; Search in Google or more often when the RSS-K service.

PageMon.Net

PageMon.Net: We look! We boring check tons of sites for updates? Read the updates in your channel reading device.

DELTAFEED

Web page monitoring: getting news from web pages that do not deliver RSS settings: track parts of web pages using CSS selectors / ignore the advertisements and social elements.

Using ProCmon from Sysinternals to diagnose problem areas in an executable code

I want to say right away that this is only a demonstration of ProCmon capabilities to determine problem areas in the software. 1c83 was chosen for experiments due to the non-obviousness of the method of searching for the entry point into the procedure for checking the presence of installed key emulators. It is performed after different times after the start of about 3 ~ 10 minutes, and causes the appearance of the “violation of the integrity of the system” window with the subsequent closure of the application. I urge everyone to use only licensed software. Consider this article as a description of the possibility of hacking, there is no sense. If only because 1c83 has long been hacked and without me. Any 1C-nick in a second will tell you how to launch it without a key.

If anyone does not know ProCmon from Sysinternals can put an interceptor on the systemic events of the processes with files and the Winduz Register. And although any process breeds a giant number of calls to files and the register at start, and in the process of work too, the use of filters and search for events simplifies the presence of the right. An interesting feature of ProCmon is to preserve the call stack for each event. Thus, you can trace which modules and in what place this or that event gave rise to.

So, put a filter named process 1c.

Run 1C, and then only turn on the seizure of events. Thus, we will miss a large number of events that occur at the start. We are waiting for the appearance of a violation of integrity.

Stop the capture of events and start viewing from the end in search of something suspicious. Almost immediately we run into something interesting.

Click on any event and go to the Steas tab.

All that is obviously already belongs to the Windus nucleus modules above the horizontal line, but three addresses below are of interest. One of them probably has the address of the return of the verification procedure. Launch 1C again and attach ourselves to a debugger from Visual Studio, for simplicity, t.to. We already have it at hand.

Let’s stop the process and enter the desired address to the Dizassembler window, for example, the very first in the challenge order.

The leading zeros in so much it added to us, t.to. This is a 64-bit process. So he is a challenge from which a return to the desired address is supposed. Put the stopping point, start the stopped process, and we will wait.

After some time, the stop point really works. We pass the call in one step forward on F10 and watch the contents of the AX register, everyone knows that the calls of functions most often return the result in it. We see some kind of suspicious Constant, which coincides with the next CMP comparison command.

We launch the execution further and make sure that nothing has changed, the program swifts as usual and flies out. Well, what will happen in the absence of an emulator? Run 1C again, stop, cross at our address, put the stop point. Everything as before. We go to the Winduz device manager and turn off the emulator device, rename the register section with dumps and the driver file in System32, since we saw appeals to the corresponding names in the list of captured events. Run the process from Visual Studio and wait.

We see that in this case another constant is returned, which is also checked nearby. We run the execution further and convince that the program works without problems. Suppose 0xa19d this check is done normally, and 0x91cb is a violation of integrity. With two lines above, we see the unconditional transition of JMP and understand that the previous one before the stopping point Call, this is the entry point to the check procedure and, apparently, the previous call checks the Winduz register, and the call at the stop point. files, which is quite consistent with the order of captured events. Passing the path from the entrance point to exit from the procedure in mode with the emulator, we convince that the transition to address 0x10e67DFB1 leads to emergency completion. Thus, if you try to jump immediately from the entrance point to the address 0x10e67DF99, then perhaps the check will be completed.

You will not have to climb into the directories for the codes, t.to., Fortunately, immediately above the entrance point, we see a two.byte instruction of the unconditional relative transition of JMP. It is clear that the code of the instructions is EB, and the second byte means displacement. T.to. Everyone knows that the register of the address of the current instruction always contains the address following the currently executed, then to the address of the entry point we need to add 2 and from this place to calculate the number of bytes to the target address, so we get the right displacement (second byte of the instruction) 2E. Open the Dampa memory window and at the address of the entrance to the verification procedure we change two bytes to our instructions.

We run the program to be executed further. And what do we see? We are lucky and it works 🙂

It could be said here that theoretically it is possible to use the function of the Windows of the API WriteprocessMory, and automate amendments to the operational memory of the process after its start, but I did not continue research in this direction, since there was no such purpose.

A simple way to monitor the site and manage the domain

Автор: Ирина Вебер, SE Ranking.

For online companies, it is important to control everything, including changes on the site. It is necessary to track what content appeared on the site, whether images, pages, articles or other files. Especially when you have several multi.page sites.

With this approach, you will always be aware of changes immediately after updates or any other changes in the contents. This is also a good way to prevent hacker activity and constantly be aware of whether your site is working now or not. Unfortunately, many site owners underestimate how important it is to track the changes. Especially for sites that are focused on promotion through content.

AI-102 Certification Exam Preparation Workshop | Azure AI Engineer Associate Exam Road Map | AI-100

When the changes occur unexpectedly and quickly, this can cause a number of problems for online business. For example, the new copywriter used the term that should be avoided in your niche, or someone deleted your page of Privacy Policy, which is important for observing GDPR. The problem is that the majority thinks that it is difficult or impossible to detect any important changes in the contents of the site.

Fortunately, there are many useful tools that can be used to automatically detect any content updates. With these tools you do not have to check the changes manually and independently monitor the performance and accessibility of the server.

SE RANKING

Many sites are dynamic. To increase conversions and sales, marketers constantly improve the structure of the site and design, create effective CTA on target pages and pages with prices, change content on the main pages. To find out what changes are made to the site, what works for your competitors, and what theories they test, you can use the tool for monitoring changes on the pages in SE Ranking.

SE RANKING-a powerful SEO tool for monitoring that helps content marketeologists to track changes on the site.

  • Changes in the metaras test of the page
  • Editing in the text
  • Changes in incoming and outgoing links
  • Changes on competitors’ sites
  • Page status in Google and Yandex indexes
  • Robots file changes.TXT
  • All you need to do is add to the list all the pages of the site that you need to track (data can be imported in CSV, XLS il XLSX). After that, you will receive instant notifications of email changes.
  • The tool checks all pages for any changes made to key SEO elements: headlines, metathegs, keywords, Robots file.TXT, http stitches, content, number of incoming and outgoing links and so on.
  • You can also monitor certain parts of the pages. To do this, use the tag: insert it into the page code that you want to track.
  • Compare all changes on the pages of the site for different time periods. Red color marked remote areas of contents, green. recently added.

SE RANKING also allows you to plan the tracking of changes and receive reports using intra.system notifications or by email. over, you can allow other users to create page groups and highlight the content that needs to be tracked.

The tool is especially useful for volumetric content, which is constantly updated.

Expansion for Chrome Page Monitor

No matter if you are waiting for a new article on the Searchengines website.GURU, monitor the rate on eBay, wait for the answer from someone at the marketing forum or new Комментарии и мнения владельцев on the article on the blog-constantly returning to the site can be tedious and energy-consuming. Fortunately, you can track these updates using Page Monitor. free expansion for Google Chrome.

Page Monitor is a good way to find out when updating occurs on the site. In order not to miss anything, you will receive push notifications in the browser.

  • Download the extension from Chrome. The Page Monitor icon will appear in the upper right corner of the browser. We go to the page that you need to track, and click “Monitor this Page” in the drop.down menu.
  • You can track an unlimited number of pages and sites. over, you can track certain parts of the page using Regex or Selector. For example, a certain HTML code instead of tracking the entire site.

Since Page Monitor is an extension for Chrome, it does not send email notifications. Every time you want to track changes, you need to open a browser and select “View All Updates”. Please note that remote content will be highlighted in red, and the new one. green.

Google Analytics

Google Analytics is one of the most effective tools for tracking your site’s effectiveness. One of his chips is the ability to leave Комментарии и мнения владельцев after making any changes on the site. This tool allows you to build and disassemble detailed graphs with notes.

In Google Analytics, you can create goals for monitoring any changes associated with your site. Objectives may include any changes in content, viewing certain pages or lidogeneration. The conversions reports displays the effectiveness of the site, taking into account the goals set.

The site speed report is another good way to identify technical problems on your resources. The tool makes it possible to receive notifications about a decrease in the average page load time and shows all new and old problems.

Distill Web Monitor

Thank you for reading! At the moment, most of my notes, articles and collections are released in Telegram Levashov channel. Be sure to subscribe to not miss the world’s news, useful instructions and the necessary services.

Respect for the post! Thanks for the work!

Want more blog posts? Software collections and services, as well as gadget reviews? Now, to write regularly and delight you with big reviews, I need help. To maintain the site on a regular basis, you can subscribe to the Boosty service. Or use Yumoney (former Yandex money) for one.time support:

Thanks in advance! All funds raised will be launched for the development of the site. Project support is a gift to the site owner.

How to use Process Explorer to search for registry keys that change settings

By setting the operating system, we set the flag or change the value of the revealing list, but did you think where these values ​​are actually stored? Many applications and almost all Windows settings are stored in the registry somewhere.

In today’s example, we will determine in which particular vein of the registry the first setting of the taskbar called “Fix the Task Panel”, which should be present in all versions of Windows. So, now our mission is to find out exactly where this parameter is stored in the register. You can monitor this specific parameter, or you can try one of the other parameters in the same dialog box. or in any other place for which you want to find a place in the registry where it is stored.

The first thing you need to do when trying to capture a set of data. This is the launch of Process Monitor, and then change the setting. At this stage, you can prohibit Process Monitor to continue registering events so that the list of events does not grow too much. (Hint: In the “File” menu to stop the recording of events, remove the box from the “Capture Events” option or this is the third icon on the left).

Now that we have a lot of data on the list, it’s time to filter the list to reduce the number of lines that we have to view. Since we are considering the value of the registry that changes, we need to filter on “Reggvalue”, which Windows uses to actually install a new parameter in the registry section. Use the “Include” option to show only these events.

Now your list should be limited only by the keys of the registry that have been changed, so the time has come to look at events and try to find out what kind of registry section may be. Since we check the parameter “block the taskbar”, and one of the custom.made sections of the registry contains the word “taskbar” in the title, this is a good place to start. Click your right mouse button path and select Jump to (“Go to the place”).

Process Monitor will open the registry editor and highlight the key in the list. Now we need to make sure that this is really the right key that is quite easy to determine. Take a look at the setting, and then look at the key. Now the setting is included, and the key is set to 0.

Therefore, change the settings, click “Apply” in the dialog box, and then use the F5 key to update the window editor window. In our case, we definitely chose the correct parameter, so now you can see that value 1 is set for the Taskbarsizemove parameter.

If you have chosen the wrong value, you will not see changes when re.testing the settings. So go and find the following logical option and start again.

Eliminating problems using Process Monitor

In fact, it is impossible to illustrate in one article on how to eliminate any problem using Process Monitor or any other tool in this regard. Too many combinations of problems, too many ways that something may go wrong.

However, we can show how we actually used Process Monitor to eliminate the real problem that really happened to one of our test computers. We installed some kind of malicious software, and then decided to try to clean the computer. The problem was the record on the “Deletion of Programs” panel, which simply did not disappear.

Each time we clicked “change” to delete it, we received an error “An error occurred while trying to delete Awfulapp. Perhaps she has already been deleted. You want to delete AWFULAPP from the list “Programs and components? “”.

That would be great if we did not receive an error message: “You are not right enough to delete outfoxTV from the list of programs and functions. Please contact the system administrator “.

The first thing to do was to try again the process of removal with the advanced Process Monitor, which has seized a huge amount of data. This time we decided to use the Find function (“find”) (Ctrlf) to quickly find what we were looking for in the list. You can also use the filter if you want, but it seemed simple and, fortunately, it worked for the first time.

Looking at the first element in the list, we noticed a mistake: Windows tried to access sections of the registry related to the deletion program, but in fact they were not in the registry in the place that Windows was looking for Windows. If you look a couple of keys down, you will see the REGOPENKEY event with the result of success for some object in HKLM \ Software \ Wow6432Node.

Fulfilling the search for this registry key very quickly led us to the source of the problem: the Access Denied message (access is prohibited) when Windows tried to clean the list using Regdeletekey operation. Interesting!

The first thing to do. This is the use of the Jump to (“go to”) function to find the key in the registry and see.

Of course, look at all these registry keys! It is not surprising that on do still appears on the list.

To be sure, we opened the catalog C: \ Program Files \ to see if any files remained, but it is obvious that the application was already erased with PC.

The solution was very simple: we just manually deleted the registry section, with the removal of which Windows had problems. If we received a message about refusing access, we could use the configuration of permits to make sure that we have access and repeat the attempt.

Fortunately, the removal worked immediately, and now the list of removal programs has become clean.

These are just some of the many ways to use Process Monitor. this is an extremely important and useful utility, the development of which will take some time, but as soon as you do it, it can really help you solve many problems.

Data filtration that Process Monitor collects

As we have already mentioned a couple of times, the filters that Process Monitor provides, allow you to control exactly what events you are going to capture, which greatly simplifies you to work on what is important in the list. If you know that you are not interested in all events generated, for example, Explorer.exe, it would be reasonable to just filter them out by removing them from the list.

You can very quickly filter on any column using the context menu and the Include (“Turn on”) or Exclude (“exclude”). If you turn on the element, the list will contain only events that correspond to this particular element or any other that you specially turned on, but will not contain anything else. If you exclude the element, everything will be displayed except the events that correspond to a specific element that you excluded.

In this case, we decided to enable the CLTMNG process.exe, and now everything that we see on the list is associated with this process.

You can also use the Edit Filter option (“edit the filter”) in the menu or gain access to the Filters section (“filters”) menu to display the filter list and edit them. You can choose from the revealed dialogs and compare it according to any of the available fields, choose whether the value that you enter into the field will coincide for sure, or simply “starts with”, or a number of other parameters. Then you can choose, include or exclude events that meet these criteria.

Just do not forget to press the Add button (“add”) after you determined the filter, and before pressing “OK” or Apply (“apply”), because otherwise your new filter will not actually be activated. Believe me, this is a common mistake!

You can also delete or edit filters by selecting them in the list, and then changing or deleting them.

Too much data? Try to remove filtered events

If you know for sure that you have the right filters to watch only what you really want to see, you can consider using the Filter function. Drop Filteed Events (discard the filtered events).

In fact, there is that the Process Monitor copy shows only those elements that correspond to the filter, but everything else is still fixed in the background, which can be a ton of data in a very short time-pay attention to the state line in the example below We worked only a few minutes. If we included the Drop Filteed Events option (“discard the filtered events”), it would capture only those events that we need.

However, using this function has a great drawback: you cannot return these filtered events if you realize that you have filtered the list too much, and wanted to study events from another process. You will have to remake the whole scenario, which could be too late. Therefore, use this option with caution.

Search for a set of characters

Suppose we want to find the names “Alla”, “Anna” on the list. You can try the search through the point, but besides normal names, all garbage will return:

If we want Anna and Alla, instead of a point, we need to use the range of permissible values. Put square brackets, and inside them we list the desired characters:

Now the result is already better! Yes, we can still return “Anla”, but we will correct such errors a little later.

How square brackets work? Inside them we indicate a set of permissible characters. This may be a listing of the desired letters, or indication of the range:

[nl]. only “n” and “l”

[A-I]-all Russian letters in the lower register from “A” to “I” (except “E”)

[A-I]-all the title Russian letters

[A-ya-yuyu]-all Russian letters

[A-Z]-Latin in small font

[A-ZA-Z]-All English letters

[0-9]-Any digit

[B-y]-letters from “c” to “y” (yes, the range is not only from A to Z)

[A-ho]-letters from “a” to “g” and from “o” to “p”

Pay attention. if we list possible options, we do not put the separators between them! Neither a gap nor a comma. nothing.

[ABV]. only “a”, “b” or “c”

[a b in]. “a”, “b”, “c”, or a gap (which can lead to an undesirable result)

[a, b, c]. “a”, “b”, “c”, gap or comma

The only permissible separator is a hyphen. If the system sees a hyphen inside the square brackets, then this is a range:

One symbol! Not two or ten, but one! Consider this if you want to write something like [1-31]. No, this is not a range from 1 to 31, this record is read as follows:

Here the absence of dividers plays an angry joke with our consciousness. After all, it seems that we wrote a range from 1 to 31! But no. Therefore, if you write regular expressions, it is very important to test them. No wonder we are testers! Check what you wrote! Especially if, with the help of regular expression, you are trying to remove something =)) as if not removed the excess.

The indication of the range instead of the point helps to weed out obviously bad data:

Regex: a.I or a [a-y] I

Result for both:

Anya

Asya

Alya

Result for “a.I”:

A6

And I

And I

[^0-9]-any symbol except the numbers

[^Yo]. any symbol except the letter “E”

[^A-V8]-any symbol except the letters “A”, “B”, “C” and numbers 8

For example, we want to find all txt files, except for the pieces broken into pieces:

Since square brackets are special systems, they cannot be found in the text without shielding:

Regex: fruits [0]

Find: Fruits0

Will not find: fruits [0]

This regular expression says “Find the text” Fruits “, and then the number 0”. Square brackets are not shielded. it means that inside there will be a set of permissible characters.

If we want to find exactly the 0-leaf element of the fruit array, we must write down as follows:

Regex: fruits \ [0 \]

Find: Fruits [0]

Will not find: fruits0

And if we want to find all the elements of an array of fruits, we put unexplored inside the shielded square brackets!

Regex: fruits \ [[0-9] \]

Will find:

fruits [0] = “orange”;

fruits [1] = “apple”;

fruits [2] = “lemon”;

Will not find:

cat [0] = “Cheshire cat”;

Of course, such a regular expression becomes a little difficult, so many different characters are written.

Without panic! If you see a complex regular expression, then just disassemble it in parts. Remember the basis of effective time management? Elephant must be eaten in parts.

Suppose a mountain of letters has accumulated after the vacation. You look at her and immediately fall into despondency:

The problem is that the load of the task interferes with working. We understand that this is for a long time. But I don’t want to do a big task. Therefore, we put it off, take a smaller task for the tasks. As a result, yes, the day has passed, but we did not have time to finish.

And if you do not waste time thinking “how much time it takes me”, and focus on specific task (in this case, the first letter from the stack, then the second. ), then you will not have time to look back, as everything is already raked!

We will analyze the regular expression in parts-fruits \ [[0-9] \]

Then the reverse slash. Yeah, he shouts something.

What exactly? Square bracket. So, this is just a square bracket in my text. “fruits [“

Further a square bracket again. It is not shielded. it means that this is a set of permissible values. We are looking for a covering square.

Listing options

Square brackets [] help to list options for one symbol. If we want to list words, it is better to use a vertical line.

Regex: Olya | Olga | Kitik

Will find:

Troubleshooting Memory Problems in Java Applications

Olya

Olga

Cat

Will not find:

Olenka

Kitten

You can use a vertical line for one symbol. You can even inside the word. then we take a variable letter in round brackets

Round brackets indicate a group of characters. In this group we have either the letter “n”, or the letter “l”. Why are brackets needed? Show where the group begins and ends. Otherwise, the vertical feature will apply to all symbols. we will look for either “AN” or “la”:

And if we want “Anya” or “Alya”, then we use the transfer only for the second symbol. To do this, take it into brackets.

But to replace one letter, it is better to use [], since a comparison with a symbolic class is easier than processing a group with a check for all its possible modifiers.

Let’s go back to the task “check the date introduced by the user using regular expressions”. We tried to record for the day the range [0-3] [0-9], but it passes the values ​​33, 35, 39. This is not good!

Then let’s sign TK more details. Ta-a-A-Ak. If the first digit:

the second can be from 1 to 9 (date 00 cannot be)

Let’s make regular expressions for each item:

And now it remains to combine them in one expression! We get: 0 [1-9] | [12] [0-9] | 3 [01]

By analogy, we analyze the month and year. But this remains for you for your homework =)

Then, when we sign regularations separately for the day, month and year, we collect all together:

Pay attention. each part of the regular expression we take in brackets. Why? To show the system where the choice ends. Look, let’s say that for a month and year we have an expression:

See the problem? The number “19” will be considered the correct date. The system does not know that the overkill of options | ended at the point after the day. So that she can understand this, you need to take the bust in the brackets. As in mathematics, we share the terms.

So remember. if the overkill goes in the middle of the word, it must be taken into round brackets!

Regex: a (nn | ll | lin | ntonin) and

Will find:

Anna

Alla

Alina

Antonina

Regex: Ann | ll | lin | ntonina

Will find:

Anna

Alla

Annushka

Kukulinka

Total, if we want to specify the permissible values:

Several characters or a whole word. we use |

BYRGPUB.COM 2022