vbalien / spicetify-extension-autoSkipPattern

Automatically skip songs using regular expression patterns.
1 stars 0 forks source link

What is the syntax for adding patterns? #1

Open Volern opened 1 year ago

Volern commented 1 year ago

I have no idea how you specify patterns to skip. The screenshot shows an example for instrumental and an artist, but Im not sure how that relates to your own custom phrases. Does it work like this? /(tag to skip|another tag to skip|etc)/i or is it like /(tag to skip|another way to say previous tag)/i if so how do you do multiple? and what is the /i at the end for?

morialo3 commented 1 year ago

I have no idea how you specify patterns to skip. The screenshot shows an example for instrumental and an artist, but Im not sure how that relates to your own custom phrases. Does it work like this? /(tag to skip|another tag to skip|etc)/i or is it like /(tag to skip|another way to say previous tag)/i if so how do you do multiple? and what is the /i at the end for?

In Typescript or JavaScript regular expression begins with / and if there a group of words to include you add ()with the word you want to be found inside them and to separate those words add | in between, then add / at the end, the i in the end is called a "flag" it means 'case insensitive'.

evkaw commented 1 year ago

is there any way to skip features on songs?

luckybu11 commented 1 week ago

/w3schools/i is a regular expression. w3schools - a pattern (to be used in a search). i - a modifier (modifies the search to be case-insensitive). Patterns: [abc] - Find any of the characters between the brackets [0-9] - Find any of the digits between the brackets (word1|word2) - Find any of the alternatives separated with | \d - Find a digit \s - Find a whitespace character \b - Find a match at the beginning of a word like this: \bWORD, or at the end of a word like this: WORD\b \uxxxx - Find the Unicode character specified by the hexadecimal number xxxx n+ - Matches any string that contains at least one n n* - Matches any string that contains zero or more occurrences of n n? - Matches any string that contains zero or one occurrences of n source: https://www.w3schools.com/js/js_regexp.asp