정규 표현식 작성을 도와주는 툴

http://sourceforge.net/projects/regexcreator/

http://sourceforge.net/projects/quregexmm/

http://sourceforge.net/projects/regex-util/

http://sourceforge.net/projects/regex-assistant/

http://sourceforge.net/projects/regextester/

http://sourceforge.net/projects/regexpeditor/

http://weitz.de/regex-coach/#install

http://laurent.riesterer.free.fr/regexp/

http://www.gskinner.com/RegExr/

http://www.regexbuddy.com/

출처 : http://kldp.org/node/107799
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2009/08/11 08:22 2009/08/11 08:22
Response
No Trackback , No Comment
RSS :
http://shiftkey.org/rss/response/229

ATL 정규식 RegExp에서 한글 패턴

이 글은 이곳에서 갈무리 했습니다.

asp 에서 regExp 정규식 쓸려고하는데 도움좀 부탁드립니다.

air82 2006.10.18 08:38

4

폼에서 id 와 passwd 입력받은것을
id 는 영어 숫자만 입력 된것은 true 이고 다른건 faile되도록
passwd도 역시 똑같이 이렇게 가능하도록
어떻게 해야하는지 좀 가르쳐주세요
자바스크립 말고 asp 코드 자체내에서 처리할려고하는데
아시는분 도움좀 부탁드리겠습니다.

re: asp 에서 regExp 정규식 쓸려고하는데 도움좀 부탁드립니다.

  inkeal 

2006.10.18 13:33


질문자인사 잘배웠습니다. 감사릉

Function Word_check(str,patrn)
Dim regEx, match, matches

SET regEx = New RegExp
regEx.Pattern = patrn ' 패턴을 설정합니다.
regEx.IgnoreCase = True ' 대/소문자를 구분하지 않도록 합니다.
regEx.Global = True ' 전체 문자열을 검색하도록 설정합니다.
SET Matches = regEx.Execute(str)

if 0 < Matches.count then
Word_check = false
Else
Word_check = true
end if
End Function


위의 코드는 정규식을 이용해서 문자열이 패턴만으로 이뤄졌는지 확인하는 함수 입니다.


사용 방법은


response.write Word_check("문자열","패턴")

몇가지 패턴을 적어보자면


pattern0 = "[^가-힣]" '한글만
pattern1 = "[^-0-9 ]" '숫자만
pattern2 = "[^-a-zA-Z]" '영어만
pattern3 = "[^-가-힣a-zA-Z0-9/ ]" '숫자와 영어 한글만
pattern4 = "<[^>]*>" '태그만

pattern5 = "[^-a-zA-Z0-9/ ]" '영어 숫자만


님이 하시려는 기능은


Word_check(id,pattern5) 이겁니다.

이렇게 하시면 true나false가 반환 됩니다.



크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by shiftkey

2008/01/07 19:42 2008/01/07 19:42
, ,
Response
No Trackback , a comment
RSS :
http://shiftkey.org/rss/response/120


블로그 이미지

Shiftkey가 살아가는 이런 저런 이야기......

- shiftkey

Notices

Archives

Authors

  1. shiftkey

Calendar

«   2012/05   »
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Site Stats

Total hits:
160846
Today:
121
Yesterday:
156