RegExp the lifehack

RegExp the lifehack

ictechで発表したスライドです

727d714103d1475e459bac77b656092e?s=128

Roadagain

June 20, 2017
Tweet

Transcript

  1. 3FH&YQUIFMJGFIBDL Roadagain@iiplab:~$ cat *.log | grep “^\S+72”

  2. ਖ਼نදݱ /[rR]eg[eE]xp?/

  3. ਖ਼نදݱ ςΩετฤूͷཔΓʹͳΔΦτϞ

  4. ਖ਼نදݱ ίʔυฤूͷཔΓʹ΋ͳΔΦτϞ

  5. ਖ਼نදݱ ࢖͑Δͱඇৗʹศརʂ ࠷ૣϥΠϑϋοΫͷҰछ

  6. ਖ਼نදݱ Ҿ਺ͷมߋʹҰׅରԠʂ ෳ਺ύλʔϯͷλΠϙΛҰׅमਖ਼ʂ දه༳Εͷදݱʹ࢖͑Δʂ

  7. ਖ਼نදݱ ࠓճ঺հ͢Δͷ͸ ೔ৗͰ࢖͑Δਖ਼نදݱ

  8. େ·͔ͳ෼ྨ จࣈྻ ϝλจࣈ ͦͷଞͷจࣈΫϥε

  9. େ·͔ͳ෼ྨ จࣈྻ ϝλจࣈ ͦͷଞͷจࣈΫϥε

  10. จࣈྻ จࣈྻ୳ࡧ

  11. จࣈྻ

  12. େ·͔ͳ෼ྨ จࣈྻ ϝλจࣈ ͦͷଞͷจࣈΫϥε

  13. ϝλจࣈ ී௨ʹจࣈͱͯ͠࢖͏৔߹͸ Τεέʔϓ͕ඞཁͰ͢

  14. ϝλจࣈ ܁Γฦ͠ * ճҎ্ + ճҎ্ ? ճPSճ ho* =~

    hook la+ =~ claaap hoge? =~ hog
  15. ϝλจࣈ ܁Γฦ͠ {n} Oճ {n,m} OճdNճ go{2} =~ google ap{1,2}

    =~ apple
  16. ϝλจࣈ จࣈݶఆ . จࣈ [ ] <>಺ͷࣈ [a-z] BUP[ [^

    ] OPU .at =~ hat [abc] =~ abc [A-Z] =~ TeX [^hex] =~ enum
  17. ϝλจࣈ อଘ () ͘͘Δ \n ͷϚον෦ (abc) =~ abc ([ab])\1

    =~ aa
  18. ϝλจࣈ ͦͷଞ . ೚ҙͷࣈ | 03 ^ ߦ಄ ઌ಄ $

    ߦ຤ ຤ඌ  \ Τεέʔϓ .at =~ hat lic|sk =~ click ^fx =~ fxac eX$ =~ LaTeX \.a =~ .alsoc
  19. େ·͔ͳ෼ྨ จࣈྻ ϝλจࣈ ͦͷଞͷจࣈΫϥε

  20. ͦͷଞͷจࣈΫϥε 1FSMͷఆ͕ٛେຊͬΆ͍ 104*9Ϋϥε͸ ࢖Θ ͳ͍Ͱ͢

  21. ͦͷଞͷจࣈΫϥε \d ΞϥϏΞ਺ࣈ \w BMOVN \s ۭനจࣈ \d+ =~ 114514

    \w+7 =~ k1ja7a9 a\s+b =~ d␣a␣␣b
  22. ͦͷଞͷจࣈΫϥε \D [^\d] \W [^\w] \S [^\s]

  23. ਖ਼نදݱ࢖༻ྫ ద౰ʹσϞ͠·͢

  24. ·ͱΊ ਖ਼نදݱ͸ςΩετฤूͷڧ͍ຯํ ਖ਼نදݱ͸ϥΠϑϋοΫ ࠷ѱ.*͚֮ͩ͑ͱ͚͹େৎ෉