WordPressに記事として書かれている文章のうち、設定ファイル、プログラム例及びコマンドの出力結果などを除いた部分のおおよその総文字数を求めるSQL文
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- WordPressに記事として書かれている文章のうち、 | |
-- 設定ファイル、プログラム例及びコマンドの出力結果などを除いた部分のおおよその総文字数を求めるSQL文 | |
-- なお、本SQL文を利用することにより得られた結果については責任は負いかねます。 | |
select sum(char_length(regexp_replace(regexp_replace(regexp_replace(regexp_replace(post_content,'(?s)<div class="code">((?!</div>).)*?</div>',''),'<.+?>',''),'&.+?;','_'),'(\s+|\r\n|\n)',''))) | |
as total from wp_posts where post_status = 'publish' and post_type = 'post'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment