I'm sorry for the amateur question, but since I have no knowledge of regular expressions (I searched, but I was confused because there were many symbols), let me ask you a question.
"/ youtube/a-san/today" "/ youtube/b-san/today" "/ youtube/c-san/today"
Suppose you have a website with three urls built in, like. systematically
I think it has a structure like this, but how can I extract it as a regular expression (compile?) Using BeautifulSoup?
elems = soup.find_all (href = re.compile ("/ youtube/*/today"))
Then, I think that  has come out.
Answer # 1
What about below?
elems = soup.find_all (href = re.compile ("/youtube/.*/today"))
for el in elems: new_tag = soup.new_tag ('link href = "/ youtube/unknown/today"') el.replace_with (new_tag)
- python - regular expression: sub () cannot replace the matched part
- python - how to write a regular expression to get multiple numbers
- python - i extracted the data using a regular expression on the pandas dataframe, but i got an error
- python - replace pdseries with a regular expression
- python - how to use a variable as a regular expression quantifier
- python - i want you to teach me a regular expression
- python 3x - how to specify multiple conditions with a regular expression
- python - "atcoder abc 015d takahashi-kun's anguish" question about how to make a dp table for dynamic programming
- extract the img tag to make the following regular expression the shortest match [php]
- regular expressions - typescript: how to type a regular expression
- python 3x - i want to replace a specific sentence end expression with an arbitrary character string
- python 3x - regular expression_i want to erase all the phrases before a specific word
- i want to extract a url with a regular expression from a specific email that came to gmail
- php - i want to make a regular expression for the following rules
- python - when you want to judge by the number of characters from the back with a regular expression
- python - tkinter photo image question
- regular expressions - i want to search by regular expression with notepad ++, but i don't know the correct description
- in python (sympy), i want to derive a mathematical expression that expresses the relationship between the two from a single expr
- python - you may need to restart the kernel to use updated packages error
- php - coincheck api authentication doesn't work
- php - i would like to introduce the coincheck api so that i can make payments with bitcoin on my ec site
- [php] i want to get account information using coincheck api
- the emulator process for avd pixel_2_api_29 was killed occurred when the android studio emulator was started, so i would like to
- i want to call a child component method from a parent in vuejs
- python 3x - typeerror: 'method' object is not subscriptable
- dart - flutter: the instance member'stars' can't be accessed in an initializer error
- xcode - pod install [!] no `podfile 'found in the project directory