Any way to search commentaries using RegEx?

Posted under General

I'm focusing on random things again tehepero. In this case I'm trying to find Instagram & Facebook commentaries that don't have their hashtags hyperlinked, so a query like \s+# or [^"]# (to look for ones that aren't currently formatted as "#hashtag":[hashtagurl]). Also curious of if there's a way to search for things like if commentaries have titles/within commentary title fields specifically and what-not.

There is regex support, but not for all fields combined, i.e. you have to search each field individually. To search the original_description, you would use the following search parameters.

https://danbooru.donmai.us/artist_commentaries?search[original_description_regex]=\s%2B%23
https://danbooru.donmai.us/artist_commentaries?search[original_description_regex]=[^"]%23

Notice the %2B and %23. This is required, because the plus sign "+" and hashtag "#" are considered part of the URL mechanics. There are other characters besides these that also need to be escaped. You can use a website like the following to URL escape whatever regex you might want to try.

https://meyerweb.com/eric/tools/dencoder/

As an aside, if you want to search for just commentaries from Twitter, it'd be best to add the post_tags_match parameter as well.

https://danbooru.donmai.us/artist_commentaries?search[post_tags_match]=source%3Ahttps%3A%2F%2Ftwitter.com%2F*

See API:Artist Commentaries for more info on available parameters and their variations.

Ohhhhh, so artist_commentaries does support the same parameters as create/update (or rather, I didn't check the full text for search fields which does have it there since I was reading off of the model's code instead... unformatted monospaced goodness). I thought they only allowed the combined ones but turns out I just had to check the page again under search. I know of some support for parameters on other things like post_id_count for pools (at least after asking) and artists have name_regex so I figured the same would apply by flipping matches to regex.

Updated by WRS

1