Python Regular expressions -part #9 - Non-capture - Backreferencing groups

preview_player
Показать описание
In this video series, we will be tackling Python Regular Expressions.

This video goes over:
1) using non-capture groups
2) using backreferencing with groups

Don't forget to comment on what you would like to see.
Thanks for stopping by =).

Code to Python Regular Expressions series can be found at my github:

Рекомендации по теме
Комментарии
Автор

great content, may I have a question: I search (\d)+ in a pattern but I alway return the last digit of string, could you explain, tks

hainguyen-it
Автор

Thank you for your videos on regex, they are helping me learn these concepts much more easily!

antonybrun
Автор

This video goes over:
1) using non-capture groups
2) using backreferencing with groups


These are very important concepts so please take time to learn them.

Thanks for stopping by and as always like know what you like to see in future videos.

PyMoondra
Автор

Regarding backreference, like in the example "Happy Happy Holidays, Merry Christmas Christmas" using findall(), did we actually output the 2nd 'Happy' and 'Christmas' from the string as the result because backreference identifies a previously matched group and try to look for the exactly same repeated word?

conanh
Автор

Sir why did you make the string raw when backreferencing (\1)

raghavgaur
Автор

@7:10 On [7]: Surely, It should read 'when pattern has no groups, we output entire match' - NOT 'when output has no groups...' Also @7:39 - With the id's and names - why not make it into a long string s = ('xxx' 'yyy') then you don't have to worry about missing out on what's off to the right!

jeremyflowers
Автор

Can you please tell me the difference between (\w+) and (\w)+ ?

shubhamtandan