1. 程式人生 > >篩選字串中for後面的IP地址

篩選字串中for後面的IP地址

例項:
字串:[Aug 13 01:10:39] NOTICE[1331] chan_sip.c: Registration from ‘sip:[email protected]:6871;soid=36’ failed for ‘125.109.160.219:57057’ - Wrong password

sed “s /.* for’//g;s/:.*//g”

數學公式使用MathJax渲染* LaTex *數學公式,詳見[math.stackexchange.com] [1] .-行內公式,數學公式為:$ \ Gamma(n)=(n-1)!\ quad \ forall n \ in \ mathbb N $ .-塊級公式:[2]:https://github.com/jmcmanus/pagedown-extra“Pagedown Extra”[3]:http://meta.math.stackexchange.com / questions / 5020 / mathjax-basic-tutorial-and-quick-reference [4]:HTTP://bramp.github.io/js-sequence-圖/ [5]:http://adrai.github.io / flowchart。 js / [6]:https://github.com/ benweet / stackedit
  G a
m m a n = n 1
  q u a d   f o r a l l n   i n   m a t h b b N
.-塊級公式:[2]:https://github.com/jmcmanus/pagedown-extra“Pagedown Extra”[3]:http://meta.math.stackexchange。 com / questions / 5020 / mathjax-basic-tutorial-and-quick-reference [4]:HTTP://bramp.github.io/js-sequence-圖/ [5]:http://adrai.github.io /flowchart.js/ [6]:https://github.com/ benweet / stackedit