正規表現ベンチあげいん
もっと個性のあることやりたいよね。でも個性のある言語ってなんかあったっけ。・・・・と思ったら超身近にあった。毎日触ってるせいで気づかなかったよ。Scilabがあるじゃんw
でもまあ、実はScilab4にはregexは無いのです。でも現在ベータ版のScilab5にはすでにその機能が入っております。とはいえ、2kページ強のPDFマニュアルの最後のほうにあるんだけどな・・・・
[start]=regexp(input,pattern,[flag]) [start,end,match]=regexp(input,pattern,[flag]) [start,end]=regexp(input,pattern,[flag]) [start,end,match,token]=regexp(input,pattern,[flag])
ということで、早速やってみた。
b = "b"; for i = 1:20 b = b + b; end; b = b + "r"; r = "/^b.*b.*b.*b.*b.*b.*b.*b.*b.*b.*b.*b.*b.*b.*b.*b.*b$/"; regexp(b,r)
さーて、どうなることやら。wktk。
$ ~/scilab_official/bin/scilab -nwni -f test.sce Warning: Localization issue: Error while binding the domain from /home/yuta/scilab_official/../locale/ or /home/yuta/scilab_official/locale/: Switch to the default language (English). ___________________________________________ scilab-trunk-SVN Copyright (c) 1989-2008 Consortium Scilab (INRIA, ENPC) ___________________________________________ !!! WARNING !!! This software is being provided "as is", without any express or implied warranty. This is a development and not at all a final or stable version of Scilab 5.0 that will be released in the future. A lot of features are missing and buggy. In no event will the authors be held liable for any damages arising from, out of or in connection with the software or the use or other dealings in the software. Startup execution: loading initial environment regexp(b,r) !--error 999 regexp: Unknown error. at line 4 of exec file called by : exec('SCI/etc/scilab.start',-1);;exec('test.sce',-1)
-
- >
ちょwwww落ちたwwwww
こんなにひ弱だとは思って無かったよ・・・・