View Single Post
Old 03-29-2023, 02:50 PM   #975
Wiggo
Leftutti
Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.Wiggo ought to be getting tired of karma fortunes by now.
 
Wiggo's Avatar
 
Posts: 549
Karma: 1717097
Join Date: Feb 2019
Location: Bavaria
Device: iPad Pro, Kobo Libra 2
Quote:
Originally Posted by DaltonST View Post
Wiggo:



Go here: https://pythex.org/?regex=Titel%20der%20Originalausgabe%5B%3A%5D(.%2B )%24%7CDie%20Originalausgabe%20erschien%20unter%20 dem%20Titel%20%5B%C2%BB%5D*(.%2B)%5B%C2%AB%5D*%24% 7CTitel%20der%20amerikanischen%20Originalausgabe%3 A%20%5B%C2%BB%5D*(.%2B)%5B%C2%AB%5D*%24&test_strin g=Book%20%231%3A%20%20Titel%20der%20Originalausgab e%3A%20THE%20MEMOIRS%20OF%20LADY%20TRENT%201%3A%0A A%20NATURAL%20HISTORY%20OF%20DRAGONS%0A%0ABook%20% 232%3A%20%20Titel%20der%20amerikanischen%20Origina lausgabe%3A%0A%C2%BBA%20Memory%20of%20Light%C2%AB% 0A%0ABook%20%233%3A%20%20Die%20Originalausgabe%20e rschien%20unter%20dem%20Titel%20%C2%BBShadowheart% C2%AB&ignorecase=1&multiline=0&dotall=1&verbose=0

Which takes you what is shown on the attached image. It is unrealistic in that it is 3 books in 1, whereas your search will be 1 book at a time. It is meant to be educational for you.

Note the "IGNORECASE" plus the "DOTALL".

EPOM can easily do this.


JS's regex search assumes MULTILINE, and not DOTALL.


EPOM lets you use whatever you want.




Added: You might want to change the [»]*(.+)[«]* to be [»](.+)[«] instead after you learn what the * does by reading the Cheat-sheet at the bottom of Pythex. The second value is highly specific to your example.



DaltonST
I managed to get the matches for each variation, but it's like the whole book is copied into #original_tile
Wiggo is offline   Reply With Quote