Python3 Advanced Tutorial 4 - Regular Expressions

Python3 Advanced Tutorial 4 - Regular Expressions

DrapsTV

10 лет назад

60,103 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@bobobobko
@bobobobko - 20.02.2015 18:38

Hey man are you from uk or usa btw?

Ответить
@benjaminpelc4871
@benjaminpelc4871 - 27.02.2015 14:38

Good video. 

Ответить
@MrKartos1
@MrKartos1 - 02.03.2015 16:52

Learning with your videos makes it much more fun, you're a great teacher.
And thank you for your interaction with your viewers!

Ответить
@mrbokabi9619
@mrbokabi9619 - 19.05.2015 15:02

I always hate regular expressions

Ответить
@Soso-gs5in
@Soso-gs5in - 25.05.2015 00:56

Hello ^_^
I want to know how to brute force a .zip or .exe file for get password ?

Ответить
@MaxGoddur
@MaxGoddur - 05.10.2015 21:26

Didn't find your search a file for word at the link you have posted or did I do something incorrect?

Ответить
@MaxGoddur
@MaxGoddur - 05.10.2015 21:46

Tried running your lookup.py script on my windows machine and all it did was open my pyscripter with the script presented.

Ответить
@EchoBravo2
@EchoBravo2 - 03.11.2015 04:58

One correction for re.match()
it is NOT for matching the whole string, but the beginning of the string. i.e. if searched pattern located in the beginning of the string, and you are using re.match(), then it will be found.

example:
line = "think I understand regular expression"
matchResult = re.match('think', line, re.M|re.I)

This will result in
Match Found: think

Ответить
@Dara-lj8rk
@Dara-lj8rk - 15.07.2016 07:23

Hi Draps,
Can you please let me know what the advantage of re is compared to searching/replacing using Python string built in methods. i.e. "myString".find("myWord") vs, re.search("myWord", "myString") ?

Ответить
@rickoly
@rickoly - 20.08.2016 22:28

Hi.
I have problem finding words witch regex . I want the pattern to find the words that does not contain 'ion' at the end of them so i tried this pattern \b\w+(?!hound)\b but I don't know why it returns all the words and does not work.so any idea about the pattern?

Ответить
@burntwax581
@burntwax581 - 22.11.2016 19:17

Hey man I appreciate the video. Wish it went into detail about argparse, how the lookup.py file worked and regex syntax. Thanks.

Ответить
@tricoliciandrei7842
@tricoliciandrei7842 - 09.03.2017 18:46

I try to find some text by name in text.txt, i get error someone help ?

import re
import argparse

def Main():
namefile = input("Enter name of what do you want to find: ")

searchFile = open("testing.txt","r")
lineNum = 0

for line in searchFile.readLines():
line = line.strip('\n\r')
lineNum += 1
searchResult = re.search(namefile , line, re.M|re.I)
if searchResult:
print(str(lineNum) + ': ' + line)
else:
print("Nothing found in search")
searchFile.close()

if _name_ == '__main__':
Main()

Ответить
@Mr8lacklp
@Mr8lacklp - 01.04.2017 12:41

It's O as in Olaf not 0 as the number for the measurement of computional complexity

Ответить
@eliudnjai
@eliudnjai - 10.09.2017 20:20

why are u using argparse instead of import sys. then use sys.argv[1]

Ответить
@RavindraKumarSG
@RavindraKumarSG - 29.11.2017 17:06

great work

Ответить
@benjamincontreras4361
@benjamincontreras4361 - 22.06.2018 01:05

what if you want to extract just a portion of a long word? is it possible?

Ответить
@DGDG0000000
@DGDG0000000 - 04.04.2019 19:37

Not advanced at all

Ответить
@Dopeboyz789
@Dopeboyz789 - 23.07.2019 03:50

Great video. But i have a question i am new to python and doing basic code is there a way to use if statement to match two different dataframe?

Ответить
@kartoffelmozart
@kartoffelmozart - 03.11.2019 13:20

Hello, thank you a lot for your amazing tutorials. I think i don't see how >>> re.search("cat","cats are cute") is different from >>> "cat" in "cats are cute". If you use the latter, the match found is the string "cat"

Ответить
@MAFiA303
@MAFiA303 - 23.08.2020 21:45

I had to stop the video and log into my google account and allow them to know what video I watch to say: REJEX?
WTF ITs regex g as in "God! who pronounces it as reJex!"

Ответить
@韩三越
@韩三越 - 05.10.2021 11:07

A mistake: to have a result from re.match, it doesn't need to match the entire string, but match from the beginning of the string.

Ответить