A blog for programmer
A blog for programmer
æ£è¦è¡¨ç¾ã«ããããªãã¼ã·ã§ã³çã§ãå®å ¨ä¸è´ã示ãç®ç㧠^ 㨠$ ãç¨ããæ¹æ³ãä¸è¬çã§ãããæ£ãã㯠\A 㨠\z ãç¨ããå¿ è¦ãããã¾ããRubyã®å ´å ^ 㨠$ ã使ã£ã¦å®å ¨ä¸è´ã®ããªãã¼ã·ã§ã³ãè¡ãã¨èå¼±æ§ãå ¥ããããã¯ãã¨ãªãã¾ããPerlãPHPã®å ´åã¯ãRubyç¨ã§ã¯ããã¾ãããä¸å ·åãçããã®ã§ \A 㨠\z ã使ãããã«ãã¾ãããã ã¯ãã㫠大å£ããã®ããã°ã¨ã³ããªãPHPeråããRuby/Railsã®è½ã¨ãç©´ãã«ã¯ãRubyã®è½ã¨ãç©´ã¨ãã¦ãå®å ¨ä¸è´æ¤ç´¢ã®æå®ã¨ãã¦ãæ£è¦è¡¨ç¾ã® ^ 㨠$ ãæå®ããä¾ããRuby on Rails Security Guideããã®å¼ç¨ã¨ãã¦ç´¹ä»ããã¦ãã¾ãã以ä¸ã®æ£è¦è¡¨ç¾ã¯ãXSS対çã¨ãã¦ãhttpã¹ãã¼ã ãããã¯httpsã¹ãã¼ã ã®URLã®ã¿ã許å¯ããæ£è¦è¡¨ç¾ã®ã¤ããã§ãã /^https?:\/\/[^\n]+$/
Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby, ...) Russ Cox [email protected] January 2007 Introduction This is a tale of two approaches to regular expression matching. One of them is in widespread use in the standard interpreters for many languages, including Perl. The other is used only in a few places, notably most implementations of awk and grep.
JavaScriptã®æ£è¦è¡¨ç¾ã§ç¹å®ã®æååãæãåºããã°ã«ã¼ãåãã«ã¤ãã¦è§£èª¬ãã¾ãã JavaScriptã§ç¹å®ã®æååãæãåºãã¦å¦çããããã¨ãããããã®ã§ãããã°ã«ã¼ãåã®ä½¿ãæ¹ãå¿ãã¦ãããã§æ¤ç´¢ãã¦ããªããªããããããªãã®ã§ãåå¿é²ã§æ®ãã¦ããã¾ãï¼ä»ã«é©åãªæ¹æ³ãããããã§ãããããã¾ããï¼ã ï¼ï¼ç¹å®ã®æååãæãåºã ã¾ãåºæ¬ã¨ãã¦ãç¹å®ã®åºå®æååãæãåºãã«ã¯ãmatché¢æ°ã§æ¬¡ã®ããã«è¨è¿°ãã¾ãã var foo = 'abcdefg'; var bar = foo.match(/abc/); ããã¯å¤æ°fooã«ãabcãã¨ããæåãå«ã¾ãã¦ããã°ãå¤æ°barã« abc ãè¨å®ããã¾ãã å¤æ°fooã«ãabcãã¨ããæåãå«ã¾ãã¦ããªãå ´åãå¤æ°barã«nullãè¨å®ããã¾ãã ãã®ä½¿ãæ¹ã¯ãæ¤ç´¢ãããæååãããããã決ã¾ã£ã¦ãã¦ãä¸è¨ã®ãããªä»£å ¥æã§ã¯ãªããå¤
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}