Computer Science, asked by somendra3717, 1 year ago

What is the purpose of adding a lowercase "u" as a modifier after the final delimiter in a perl-compatible regular expression?

Answers

Answered by lavpratapsingh20
0

Answer:

Explanation:

It causes pattern strings to be treated as UTF-8  

Letter 'u' matches the vacant string; the letters set the relating flags: re.U (Unicode dependent), for the whole customary expression. Rather than passing a flag contention to the re.compile()function, this is helpful on the off chance that you wish to include the flags as a component of the regular expression.

The reason to include the lowercase "u" as the modifier after last delimiter in the perl-compatible regular expression is that it causes the pattern strings which must be treated as the UTF-8. The letter 'u' can coordinate with the unfilled string for example the letters can set comparing flags for example re.U (Unicode dependent), for the entire regular expression.  

It tends to be valuable if the client wants including flags as a piece of normal expression without passing the flag argument to re.compile()function.

Answered by indiabrainly
0

Answer:

Explanation:

The purpose to add the lowercase "u" as the modifier after final delimiter in the perl-compatible regular expression is that it causes the pattern strings which must be treated as the UTF-8. The letter 'u' can match with the empty string i.e. the letters can set corresponding flags i.e. re.U (Unicode dependent), for the whole regular expression.

It can be useful if the user wishes for including flags as a part of regular expression without passing the flag argument to re.compile()function.

Similar questions