This is just an experiment and does not do anything yet!
This is just an experiment and does not do anything yet!
ã¯ããã« ããã«ã¡ã¯ãhirataraã§ãã ç§ãåãã¦æ£è¦è¡¨ç¾ã使ã£ãã®ã¯ãPerlã«ããCGIã§ã®æååå¦çã§ãããããããç§ã¯Perlã使ãç¶ããä»ã§ã¯æ£è¦è¡¨ç¾ãªãã®ã³ã¼ãã£ã³ã°ã¯èããããªãã»ã©ãæ£è¦è¡¨ç¾ãå½ããåã®æ©è½ã¨ãã¦æ¥å¸¸çã«ä½¿ã£ã¦ãã¾ããæã¯æ¨æºã§ã¯æ£è¦è¡¨ç¾ããµãã¼ããã¦ããªãã£ãJavaããä»ã§ã¯æ£è¦è¡¨ç¾ããµãã¼ãããããã«ãªãã¾ãããJavaã ãã§ã¯ãªããä»æ¥ã§ã¯ã»ã¨ãã©ã®é«ç´è¨èªã«ã¨ã£ã¦ãæ£è¦è¡¨ç¾ã¯ãªãã¦ã¯ãªããªãæ©è½ã§ããã¨è¨ã£ã¦ãéè¨ã§ã¯ãªãã»ã©ã¡ã¸ã£ã¼ãªæ©è½ã¨ãªã£ã¦ãã¾ãã æ¬è¨äºã§ã¯ããã®æ£è¦è¡¨ç¾ã®èå°è£ã«å ãå½ã¦ã¾ããä¸è¦ããã¨ä½ããã¨ãé£ããããªæ£è¦è¡¨ç¾ã¨ã³ã¸ã³ã§ããããã®æ ¹åºã«ã¯æ°å¦çãªæ¦å¿µãããããã®æ¦å¿µããç¥ã£ã¦ããã°åºç¤ã¨ãªãæ©è½ã®å®è£ ã¯ãããªã«é£ããããã¾ããããã®é£è¼ã§ã¯ãã®æ°å¦çãªæ¦å¿µãPythonã使ã£ã¦è¡¨ç¾ããªãããå®éã«åä½ããæ£è¦è¡¨
Perl, Rubyãªã©æ軽ã«ä½¿ããããã°ã©ãã³ã°è¨èªã«æ £ãã¦ããã¨ãããããããã¹ããã¼ã¿ã®å¦çã«æ£è¦è¡¨ç¾(regular expression)ã使ã£ã¦ãã¾ããã¡ã§ãã ããã©å®ã¯ãæ£è¦è¡¨ç¾ã®å¦çè½åãè¶ ãããã©ã¼ãããã¨ããã®ãåå¨ãã¾ãããã®å ¸åçãªä¾ããXMLãJSONã®ããã«ãå ¥ãåã«ãªã£ããã¼ã¿ãã©ã¼ãããã§ãã
nanto_vi, 2008-07-19 èªå·±ç´¹ä» nanto_vi (TOYAMA Nao) Days on the Moon Twitter ç®æ¬¡ ããããééã æ£è¦è¡¨ç¾ãªãã¸ã§ã¯ãã®ã¡ã½ãã ã°ãã¼ãã«ããã æååã®ã¡ã½ãã ã¾ã¨ã ããããæ¸ãæ¹ var str = "OSC Kansai 2008"; var year = 0; if (str.match(/(\d+)/)) { year = Number(RegExp.$1); } ä½ããããªãã RegExp ã³ã³ã¹ãã©ã¯ã¿ã®ããããã£ã¯ã°ãã¼ãã«å¤æ° Mozilla 2 (Firefox 4) ã§ã¯åé¤ããããã? if (str.match(/(\d+)/)) { doOtherThing(); year = Number(RegExp.$1); } function doOtherThing() { "Firefo
æ¤ç´¢ã¢ã«ã´ãªãºã (5)æ£è¦è¡¨ç¾ -1- ååã¾ã§ã¯ãåºå®æååã®ç §åã¢ã«ã´ãªãºã ãç´¹ä»ãã¾ãããããã®ç« ã§ã¯ç¹å®ã®ããã¿ã¼ã³ãã«åè´ããæååãæ¤ç´¢ããå¦çããããããæ£è¦è¡¨ç¾ã(regular expression)ãåãä¸ãããã¨æãã¾ããæ£è¦è¡¨ç¾ã¯ãgrep,sed,awk,perlãªã©ãæ§ã ãªãã¼ã«ãè¨èªä¸ã§ãµãã¼ãããã¦ããã®ã§ãããã¦ãã®æ¹ã¯ãã®æ©æµ(?)ã«é ãã£ã¦ããã§ãããã 1)æ£è¦è¡¨ç¾ã®å®ç¾© æ£è¦è¡¨ç¾ã¯ã1ã¤ä»¥ä¸ã®ç©ºç½ã§ãªããæã(branch)ãããªããåãæãã¯'|'ã§åºåããã¾ããæ£è¦è¡¨ç¾ã¯ããæãã®ä¸ã®ããããã«ä¸è´ããå ´åã«ãä¸è´ããããã¨ã«ãªãã®ã§ã'|'ã¯"è«çå"ã®å½¹å²ãæã¤ã¨ããã¾ãã
Boostã®æ£è¦è¡¨ç¾ã¯ã©ã¹ã使ã Boost ã®æ£è¦è¡¨ç¾ã¯ã©ã¹ã使ã£ã¦ã¿ããæãããã£ã¬ã¯ããªä»¥ä¸ã®ãã¡ã¤ã«ã«å¯¾ãã¦å帰çã« grep ãè¡ãã³ã¼ããæ¸ãã¦ã¿ã¾ããã 以ä¸ããã®ã³ã¼ãã§ããå帰ç㪠grep ã¯GNU grep ã® --recursive ãªãã·ã§ã³ã§ã§ããã®ã§å®ç¨çãªæå³ã¯ããã¾ããã #include <assert.h> #include <unistd.h> #include <sys/mman.h> #include <sys/stat.h> #include <fcntl.h> #include <boost/bind.hpp> #include <boost/filesystem/operations.hpp> #include <boost/filesystem/path.hpp> #include <boost/regex.hpp> using name
æ£è¦è¡¨ç¾ã©ã¤ãã©ãª âBoost Regex++â ã®ä½¿ãæ¹ âwebãä»ããããã°ã©ã ã®å®è¡âã¨ããã¢ããªã±ã¼ã·ã§ã³ã®æ°ããå½¢æ ãç¾ããperl,pythonãªã©ã«ä»£è¡¨ãããã¹ã¯ãªããè¨èªãããå©ç¨ãããããã«ãªãã¾ãããã¹ã¯ãªããè¨èªã®å¤ãã¯ããã¹ãããªãã¡æååãæ±ãã®ãå¾æã¨ãã¦ãã¾ãã ä¸æ¹C++ã¯æååãæ±ãã®ããã¾ãå¾æã§ã¯ããã¾ããã æè¿ã«ãªã£ã¦ããããæååã表ç¾ããã¯ã©ã¹std::basic_string ãæ¨æºã©ã¤ãã©ãªã«çµã¿å ¥ãããã¾ããã ããã«ãã£ã¦æååæä½ãé »ç¹ã«è¡ãããã¤ç§»æ¤æ§ã®é«ãã¢ããªã±ã¼ã·ã§ã³ã®å®è£ ãã¨ã¦ãããããããªãã¾ããã ããããªããæ¨æºã®æååãæã«å ¥ããC++ã§ãperlãªã©ã®ã¹ã¯ãªããè¨èªã«ããªããªããã¨ã®ä¸ã¤ãâæ£è¦è¡¨ç¾(regular expression)âã§ãã ãã¨ãã°Webã®èªåå·¡åãè¡ãã¢ããªã±ã¼ã·ã§ã³ãèãã¦ã¿ã¾ããã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}