recently learned python regular expressions, want to use regular expressions to extract the specified string in multiple lines
I have been searching the Internet for a long time, and there are a lot of people asking questions on the Internet, but they are all about the one-way situation. Ask the Great God for advice
example:
str = "jh2kn as.12an sss g2gs.Abc ("xxx") asdf;njkasahsda ng2gs.Abc ("yyy")"
extract xxx,yyy between "and"
< hr >my own test is:
text = "xxx ("https://www.baidu.com/1.pngxxx")"
pattern = r" ^ (. +)? (". + (")) $"
the result: xxx ("https://www.baidu.com/1.pngxxx")
" actually I just want to get: https://www.baidu.com/1.pngxxx
it"s urgent