3.2. 할 ? ¶
html 플 or 크 javascript "".matches("\Regex\"); 하 .
java Matcher 통해. ( )
Pattern.comppile("표"); Matcher matcher = new Matcher(Pattern, " 텍트"); matcher.find();
-
3.3. ? ¶
. * + [] ^ $ | {} () \ [A-Za-Z0-9] \w \W \s \S 호 ^ 호 ^
. == ( ) 하
* == () 0 .
[]호. == . a-zA-Z , 0-9.
$ 하 .
{}호 == . {0,2} 0~2 .
()호 == | .
* == () 0 .
e.g. .* 하 ( ) 0 .
+ == () 1 .[]호. == . a-zA-Z , 0-9.
$ 하 .
{}호 == . {0,2} 0~2 .
()호 == | .
4.2. 2 ¶
태 " " 하 <a href = "class > </a> <a href = "class" > </a> <a href = "clas"s" > </a>
<html> <a href ="abc"></a> <a href ="abc"></a> <a href ="dfw"></a> <a href ="dfdof></a> <a href ="dfdof class="dfdfd"></a> <a href ="dfdof" class=dfdfd" name ="cdef"></a> </html> answer : <([^">]+|"[^">]*")+"[^">]*>
, 효 .
한 , '' 해 ? 표 한...
4.3. 3 ¶
한 JavaScript
"http://www.naver.com www.naver.com naver.com google.co.kr http://kio.zc.bz/Lecture/regexp.html#chap05".match(/(http:\/\/)?([a-zA-Z]+\.)+[a-zA-Z]+\/?([^\s]+)*/g)( 함) 크트 호 혔, 히 .
var str='<body onload="firprint(;" onkeydown="keyboard);"> <input value="pause" onclick="pause();"/>'; str.match(/\s[^()\s]*([^()]*[)]|[(][^()]*)/g);.. --
- -ㅅ- -태
str.match(/\s[^()\s]*([^()]*[)]|[(][^()]*)/g); str.match(/\s([(][^(]*|[^)][)])*/g); str.match(/((http:[^\s]*)|((\s[^/.]*[.][^/.]*)))\s/g); ((3*4)+2+4)-(23)) ((3*4)+(2+4)-23)) ((3*4)+(2+4)-(23)) (3*4)+(2+4)-(23)) ((3*4)+(2+4-(23))