• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
SE Michigan PowerShell Users Group -  Regex Part1
 

SE Michigan PowerShell Users Group - Regex Part1

on

  • 1,556 views

 

Statistics

Views

Total Views
1,556
Views on SlideShare
1,542
Embed Views
14

Actions

Likes
0
Downloads
5
Comments
0

2 Embeds 14

http://michiganpowershell.com 13
http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    SE Michigan PowerShell Users Group -  Regex Part1 SE Michigan PowerShell Users Group - Regex Part1 Presentation Transcript

    • Matt Johnson SE Michigan PowerShell Script Club [email_address]
      • Introduction
      • Simple Pattern Searches
      • Simple Pattern Examples
      • Introduction to Regular Expressions
      • Closing
    •  
    •  
      • Used with both operating system commands and PowerShell commands.
      • Using cmd.exe we used “*” and “?”. With PowerShell we get a few more options.
      • Also work with -like and –notlike
      • Simple Pattern Wildcards
      • Turns out this is a basic form of regular expressions
      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
    •  
      • Dir *.txt
      • Dir [li]*
      • $ip = 192.168.23.1 If ($ip –like “*.*.*.*”) {“Valid”} Else {“Invalid”}
    •  
      • 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.”
      • Found in some programming / scripting languages, editors and utilities.
      • Programming Languages: PowerShell, Perl, .NET languages, C++
      • Editors: Visual Studio, emacs
      • Utilities: grep, Power Grep
      • Websites:
        • http://www.regular-expressions.info/
      • Websites:
        • www.regexlib.com
      • Websites:
        • MSDN Regex Class
      • Books
        • Mastering Regular Expressions by Jeffrey Friedl
        • Regular Expressions Cookbook by Jan Goyvaerts, Steven Levithan
      • Applications
        • Rad Software Regular Expression Designer
        • http://www.radsoftware.com.au
      • Applications
        • Ultrapico Expresso 3.0
        • http://www.ultrapico.com/expresso.htm
      • Applications
        • The Regex Coach
        • http://weitz.de/regex-coach
    •  
      • PowerShell and Regular expressions
      • PowerShell and .NET’s Regex class
      • Regular Expression Examples
      • Contact Me: Matt Johnson, GSEC, MCSE Email: [email_address] Blog: http://www.packetcrazy.com/blog Social Sites: mwjcomputing - Twitter, Friendfeed, Facebook