Your SlideShare is downloading. ×
0
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
SE Michigan PowerShell Users Group -  Regex Part1
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

SE Michigan PowerShell Users Group - Regex Part1

1,700

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,700
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
7
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

Transcript

  • 1. Matt Johnson SE Michigan PowerShell Script Club [email_address]
  • 2. <ul><li>Introduction </li></ul><ul><li>Simple Pattern Searches </li></ul><ul><li>Simple Pattern Examples </li></ul><ul><li>Introduction to Regular Expressions </li></ul><ul><li>Closing </li></ul>
  • 3.  
  • 4.  
  • 5. <ul><li>Used with both operating system commands and PowerShell commands. </li></ul><ul><li>Using cmd.exe we used “*” and “?”. With PowerShell we get a few more options. </li></ul><ul><li>Also work with -like and –notlike </li></ul>
  • 6. <ul><li>Simple Pattern Wildcards </li></ul><ul><li>Turns out this is a basic form of regular expressions </li></ul>Wildcard Description * Any number of characters ? Exactly one character [xyz] One of the specified characters [x-z] One of the characters in the specified area
  • 7.  
  • 8. <ul><li>Dir *.txt </li></ul><ul><li>Dir [li]* </li></ul><ul><li>$ip = 192.168.23.1 If ($ip –like “*.*.*.*”) {“Valid”} Else {“Invalid”} </li></ul>
  • 9.  
  • 10. <ul><li>From Wikipedia: “Regular expressions provide a concise and flexible means for identifying strings of text of interest, such as particular characters, words, or patterns of characters.” </li></ul><ul><li>Found in some programming / scripting languages, editors and utilities. </li></ul>
  • 11. <ul><li>Programming Languages: PowerShell, Perl, .NET languages, C++ </li></ul><ul><li>Editors: Visual Studio, emacs </li></ul><ul><li>Utilities: grep, Power Grep </li></ul>
  • 12. <ul><li>Websites: </li></ul><ul><ul><li>http://www.regular-expressions.info/ </li></ul></ul>
  • 13. <ul><li>Websites: </li></ul><ul><ul><li>www.regexlib.com </li></ul></ul>
  • 14. <ul><li>Websites: </li></ul><ul><ul><li>MSDN Regex Class </li></ul></ul>
  • 15. <ul><li>Books </li></ul><ul><ul><li>Mastering Regular Expressions by Jeffrey Friedl </li></ul></ul><ul><ul><li>Regular Expressions Cookbook by Jan Goyvaerts, Steven Levithan </li></ul></ul>
  • 16. <ul><li>Applications </li></ul><ul><ul><li>Rad Software Regular Expression Designer </li></ul></ul><ul><ul><li>http://www.radsoftware.com.au </li></ul></ul>
  • 17. <ul><li>Applications </li></ul><ul><ul><li>Ultrapico Expresso 3.0 </li></ul></ul><ul><ul><li>http://www.ultrapico.com/expresso.htm </li></ul></ul>
  • 18. <ul><li>Applications </li></ul><ul><ul><li>The Regex Coach </li></ul></ul><ul><ul><li>http://weitz.de/regex-coach </li></ul></ul>
  • 19.  
  • 20. <ul><li>PowerShell and Regular expressions </li></ul><ul><li>PowerShell and .NET’s Regex class </li></ul><ul><li>Regular Expression Examples </li></ul>
  • 21. <ul><li>Contact Me: Matt Johnson, GSEC, MCSE Email: [email_address] Blog: http://www.packetcrazy.com/blog Social Sites: mwjcomputing - Twitter, Friendfeed, Facebook </li></ul>

×