Special Syntax with Parentheses in Python


Sr.No.Example & Description
1R(?#comment)
Matches "R". All the rest is a comment
2R(?i)uby
Case-insensitive while matching "uby"
3R(?i:uby)
Same as above
4rub(?:y|le))
Group only without creating \1 backreference

Updated on: 31-Jan-2020

86 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements