Your SlideShare is downloading. ×
  • Like
正規表現のいろは
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

正規表現のいろは

  • 243 views
Published

正規表現のはじめの一歩。 …

正規表現のはじめの一歩。
入門
いろは
正規表現

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
243
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
3
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. 2012/01/16
  • 2. [abc]A single character: a, b or c[^abc]Any single character but a, b, or c[a-z]Any single character in the range a-z[a-zA-Z]Any single character in the range a-z or A-Z
  • 3. : > >> >
  • 4. [ - ][ - ]
  • 5. [ - ]
  • 6. : .: Any single characters: Any whitespace characterS: Any non-whitespace characterd: Any digitD: Any non-digitw: Any word character (letter, number, underscore)W: Any non-word charactern: New line ( )t: Tab ( )r: Carriage return
  • 7. :^Start of line$End of lineAStart of stringzEnd of stringbAny word boundary character
  • 8. :(...): Capture everything enclosed ( )(a|b): a or ba?: Zero or one of aa*: Zero or more of a (0 ) ( )a*?: Zero or more of a (0 ) ( )a+: One or more of a (0 ) ( )a+?: One or more of a (0 ) ( )a{3}: Exactly 3 of aa{3,}: 3 or more of aa{3,6}: Between 3 and 6 of a
  • 9. /
  • 10. a.*c ( )abc abc abc abca.*c a c
  • 11. a.*?c ( )abc abc abc abca.*?cabc a cabc
  • 12. 1[0-9]{3}-[0-9]{4}-[0-9]{4}d{3}-d{4}-d{4}
  • 13. ^ => ^ { } => { }$ => $ . => . => + => +- => - * => *[ ] => [ ] ? => ?( ) => ( ) | => |
  • 14. 2^0(8|9)0-[0-9]{4}-[0-9]{4}$^(0)(?:8|9)1-d{4}-d{4}$↑
  • 15. //
  • 16. /(?=aaa)(?!aaa)(?<=aaa)(?<!aaa)
  • 17. /(?<= ) (?= )(?= ):(?<= ): (* )
  • 18. /
  • 19. (?= )
  • 20. (?! )
  • 21. (?<= )
  • 22. (?<! )
  • 23. / ( )=> /=>1, 2, 3 ...($1, $2, $3 ... )( )
  • 24. 2
  • 25. (0) 0 (Match captures )(?:8|9)(?:) 1 0 (0)(?:8|9)1 090 080
  • 26. Webhttp://www4.ocn.ne.jp/~kaerume/k2e/regex_top.html#mnu_tophttp://www.kt.rim.or.jp/~kbk/regex/regex.html#NEGATIVELOOKAHEADhttp://blog.96q.org/2010/02/24/collection-of-regular-expression-problems/
  • 27. 3, 5, 7 ( ) _() _0103> (Monday)=>0103> (0103_Monday_ )