Traditional Culture Encyclopedia - Weather forecast - A regular expression contains a sentence with the specified content?

A regular expression contains a sentence with the specified content?

The function of judging whether a string contains a string in each language can be used to judge whether there is a "weather" character in the string.

Let me give an example of php language. Take a look.

You can also use regular expressions to determine whether a string contains "weather" (see figure).

Let me give two examples of php language. Take a look.