User Tools

Site Tools


journal:spring2019:jgallahe:week7

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

journal:spring2019:jgallahe:week7 [2019/03/07 02:21]
127.0.0.1 external edit
journal:spring2019:jgallahe:week7 [2019/03/13 22:41] (current)
jgallahe
Line 3: Line 3:
 ====MONTH Day, YEAR==== ====MONTH Day, YEAR====
  
-Filler ​text- your entry goes here; remove ​this line to receive full credit.+__Regular Expressions:​__\\  
 +(regex)\\  
 +often done in vim, grep, sed\\  
 + 
 +__Basic RE:__ 
 + 
 +^ - match start of the line 
 + 
 +$ - match end of the line 
 + 
 +\? - (?) - match 0 or 1 of previous 
 + 
 +. - match any single symbol 
 + 
 +* - match 0 or more of the previous 
 + 
 +[] - char class, match any one of enclosed 
 + 
 +[^] - inverted char class, do not match any one of enclosed 
 + 
 +\< - match start of the word 
 + 
 +\> - match end of the word 
 + 
 +__Extended RE:__ 
 + 
 +often done in vim, egrep, sed 
 + 
 +\+ (+) - one or more of the previous 
 + 
 +| - or 
 + 
 +() - group 
 + 
 +\(\) - regex group 
 + 
 +__Commands:​__ 
 + 
 +fgrep - fast grep, only matches a string, no expressions 
 + 
 +sed - on command line text editor 
 + 
 +awk more powerful expressions,​ used to manip data 
 + 
 +__Playing with expressions:​__ 
 + 
 +lab46:/​usr/​share/​dict$ cat words | egrep '​^(..)+$'​ | wc -l 
 +51248 
 + 
 +lab46:/​usr/​share/​dict$ cat words | egrep '​(^.*[i][n][g]$)|(^.*[e][d]$)'​ | wc -l or egrep '​(ed|ing)$'​ 
 +13474 
 + 
 +lab46:/​usr/​share/​dict$ cat words | grep '​^...*[mMg]...$'​ | wc -l 
 +4321 
 + 
 +lab46:/​usr/​share/​dict$ cat words | grep '​^..[^rstlne].'​ | wc -l 
 +56127 
 + 
 +lab46:/​usr/​share/​dict$ cat words | grep '​^.[aeiouy].[aeiouy].$'​ | wc -l 
 +1758 
 + 
 +lab46:/​usr/​share/​dict$ cat words | grep '​^.....$'​ | wc -l 
 +6806 
 + 
 +----------------------------------------------------------------- 
 + 
 +This week we worked on wpa0. And let me say this has 100% been the most challenging project for me yet. As I write this I am still trying ​to figure out some of the things that I need to change for this project to be completed. This one, even though some of the challenges is self-induced,​ has really kicked my butt. I try one thing after another, and it seems I am spinning my wheels. I hope this cool idea I had comes out in the end because right now I can't see the finish line. 
 + 
 +~Josh 
  
journal/spring2019/jgallahe/week7.txt · Last modified: 2019/03/13 22:41 by jgallahe