antiboredom / videogrep

automatic video supercuts with python
https://antiboredom.github.io/videogrep
Other
3.33k stars 257 forks source link

Issue with Searching Single-Letter Words #135

Closed delmenhorst closed 5 months ago

delmenhorst commented 5 months ago

When attempting to search for single-letter words, such as "i", using the fragments function, the expected behavior does not occur. Instead, it just slices the entire video.

antiboredom commented 5 months ago

Hi there — videogrep uses regular expression syntax for search. This means that searching for “i” will grab all words that contain an “i” in them. To ensure that you’re getting an exact match, put a caret symbol before the search term and a dollar sign after it. So for “i” you would do: “^i$”.