View Single Post
Old 04-15-2025, 06:49 AM   #74
PetBest
Enthusiast
PetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toysPetBest shares his or her toys
 
Posts: 41
Karma: 5658
Join Date: Jun 2022
Device: Kobo Libra 2
AI analyzed the regular expression to this

The regular expression:

(\.(?!kobo|adobe).*?|Books\..+)

can be broken down as follows:

Breakdown:

(\.(?!kobo|adobe).*?

\.: Matches a literal dot (.).

(?!kobo|adobe): Negative lookahead — ensures that what follows the dot is not "kobo" or "adobe".

.*?: Lazily matches any characters (as few as possible).

|Books\..+

Alternation (|) — matches either the previous part or this one.

Books\.: Matches the literal string "Books.".

.+: Matches one or more of any characters following "Books.".

Summary:

This regex matches:

A string that starts with a dot not followed by "kobo" or "adobe", and then has any characters.

OR a string that starts with "Books." followed by at least one more character.

Example Matches:

.kindle

.somethingelse

Books.MyBook

Books.test.pdf

Example Non-Matches:

.kobo

.adobe
PetBest is offline   Reply With Quote