選別
リスト項目を指定された順序で並べ替える
これは、すべてのリスト項目を逆順に表示する、非常にシンプルなブラウザベースのアプリケーションです。入力項目は任意の記号で区切ることができ、逆順に表示するリスト項目の区切り文字を変更することもできます。
このユーティリティを使えば、リスト内の項目の順序を逆にすることができます。このユーティリティはまず入力リストを個々の項目に分割し、最後の項目から最初の項目まで反復処理を行い、反復処理中に各項目を出力に出力します。入力リストには、数字、文字列、単語、文章など、テキストデータとして表現できるあらゆるものを含めることができます。入力項目の区切り文字には正規表現も使用できます。例えば、正規表現 /[;,]/ を使用すると、カンマ区切りまたはセミコロン区切りの項目を使用できます。入力リストと出力リストの項目の区切り文字は、オプションでカスタマイズできます。デフォルトでは、入力リストと出力リストの両方がカンマ区切りです。まさにリストの素晴らしさ!
In this example, we load a list of digits in the input. The digits are separated by a mix of dot, comma, and semicolon characters, so we use the regular expression split mode and enter a regular expression that matches all these characters as the input item separator. In the output, we get a reversed list of digits that all use the semicolon as a separator.
This example reverses a column of twenty three-syllable nouns and prints all the words from the bottom to top. To separate the list items, it uses the \n character as input item separator, which means that each item is on its own line.
In this example, the list elements are random cities, zip codes, and weather conditions. To reverse list elements, we first need to identify them and separate them apart. The input list incorrectly uses the dash symbol to separate the elements but the output list fixes this and uses commas.