指定の文字列から丸つき数字の部分だけを抽出するAppleScriptです。
丸つき数字の文字を数値に変換するサブルーチンのために作成したものです。
AppleScript名:文字列から丸つき数字のみ抽出する.scpt |
– Original by: Shane Stanley – Created on: 2019/11/04 – Modified by: Takaaki Naganoya – Modified on: 2021/11/26 use AppleScript version "2.4" — Yosemite (10.10) or later use framework "Foundation" use scripting additions set aRes to holdNumberWithSignOnly("⑦Accessibility Inspector") of me –> "⑦" on holdNumberWithSignOnly(aStr as text) set aNSString to current application’s NSString’s stringWithString:aStr return (aNSString’s stringByReplacingOccurrencesOfString:"[^\\U000024EA-\\U000024EA\\U00002460-\\U00002473\\U00003251-\\U000032BF\\U000024FF-\\U000024FF\\U00002776-\\U0000277F\\U000024EB-\\U000024F4\\U00002780-\\U00002789\\U0000278A-\\U00002793\\U000024F5-\\U000024FE]" withString:"" options:(current application’s NSRegularExpressionSearch) range:{0, aNSString’s |length|()}) as text end holdNumberWithSignOnly |
More from my site
(Visited 118 times, 1 visits today)