Computer Science, asked by Siddes3394, 1 year ago

How to write a regular expression to match either a or b in Python?

Answers

Answered by kr849826
0

Answer:

A regular expression is a special sequence of characters that helps you match or find other strings or sets of strings, using a specialized syntax held in a pattern.

...

Special Character Classes.

Sr.No. Example & Description

6 \w Match a single word character: [A-Za-z0-9_]

7 \W Match a nonword character: [^A-Za-z0-9_]

Similar questions