Search results

Jump to navigation Jump to search

Page title matches

  • == Useful/Standard RegEx == Its essentially done via three chunks of the regex...
    3 KB (479 words) - 17:23, 14 May 2012

Page text matches

  • == Useful/Standard RegEx == Its essentially done via three chunks of the regex...
    3 KB (479 words) - 17:23, 14 May 2012
  • To extract text that matches a regex... $res = [regex]::matches($line, "\d{4}-[A-Za-z]{3}-Week\d{1}.log")
    3 KB (391 words) - 14:39, 21 June 2013
  • ...ctual Regex will ''generally'' be consistent. The secret to creating good Regex is good and thorough testing for things that ''shouldn't'' match as much as See the [[Regex Examples]] page for some real world examples.
    5 KB (759 words) - 14:24, 5 June 2013
  • # - Get-FolderPath Bugfix: Regex now handles foldernames with "vm" in $ds = ([regex]::matches($VMDKs[$i].Filename, "(?<=\[)(.*?)(?=\])")).Item(0).Value
    4 KB (346 words) - 13:55, 18 April 2012
  • $text = [regex]::replace($text, "\\", "\\") [regex]::replace($text, "'", "\'")
    5 KB (405 words) - 13:51, 7 May 2013
  • [regex]::replace($text, "'", "\'") [regex]::replace($text, "\\", "\\")
    7 KB (851 words) - 21:00, 14 August 2017
  • $name = [regex]::matches($esx.Name, "(^\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]| ...BiosVer, "[A-Z]\d{2} 20\d{2}-\d{2}-\d{2}"))[0].Value # HP regex to extract "A19 2010-09-30" for example
    36 KB (3,811 words) - 22:03, 25 October 2011
  • ...atch </code> || Match (ie string contains) anywhere within string (can be regex) | <code> -notmatch </code> || Does not match (ie string contains) (can be regex)
    12 KB (1,798 words) - 12:55, 7 May 2019
  • $ScriptVer = [regex]::matches(($MyInvocation.MyCommand.Name), "(?<=v)[0-9]+(\.[0-9])+(?=.)") $nwno = [regex]::replace($nic.Name, "Network (?i:A)dapter ", "")
    32 KB (2,962 words) - 22:06, 25 October 2011
  • $name = [regex]::matches($esx.Name, "(^\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]| ...BiosVer, "[A-Z]\d{2} 20\d{2}-\d{2}-\d{2}"))[0].Value # HP regex to extract "A19 2010-09-30" for example
    38 KB (3,968 words) - 22:04, 25 October 2011
  • $name = [regex]::matches($esx.Name, "(^\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]| ...BiosVer, "[A-Z]\d{2} 20\d{2}-\d{2}-\d{2}"))[0].Value # HP regex to extract "A19 2010-09-30" for example
    39 KB (4,084 words) - 22:07, 25 October 2011
  • $name = [regex]::matches($esx.Name, "(^\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]| ...BiosVer, "[A-Z]\d{2} 20\d{2}-\d{2}-\d{2}"))[0].Value # HP regex to extract "A19 2010-09-30" for example
    38 KB (4,040 words) - 22:04, 25 October 2011
  • $ScriptVer = [regex]::matches(($MyInvocation.MyCommand.Name), "(?<=v)[0-9]+(\.[0-9])+(?=.)") [regex]::replace($text, "'", "\'")
    37 KB (3,560 words) - 22:06, 25 October 2011
  • $ScriptVer = [regex]::matches(($MyInvocation.MyCommand.Name), "(?<=v)[0-9]+(\.[0-9])+(?=.)") $name = [regex]::matches($esx.Name, "(^\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|
    47 KB (4,859 words) - 22:07, 25 October 2011
  • $ScriptVer = [regex]::matches(($MyInvocation.MyCommand.Name), "(?<=v)[0-9]+(\.[0-9])+(?=.)") $name = [regex]::matches($esx.Name, "(^\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|
    48 KB (5,058 words) - 08:51, 12 October 2011
  • $ScriptVer = [regex]::matches(($MyInvocation.MyCommand.Name), "(?<=v)[0-9]+(\.[0-9])+(?=.)") $name = [regex]::matches($esx.Name, "(^\b((25[0-5]|2[0-4]\d|[01]\d\d|\d?\d)\.){3}(25[0-5]|
    50 KB (5,286 words) - 10:08, 19 December 2011
  • ...: ESX name wrong when known by VC with IP Address (name now extracted with regex to handle name being IP) $ScriptVer = [regex]::matches(($MyInvocation.MyCommand.Name), "(?<=v)[0-9]+(\.[0-9])+(?=.)")
    45 KB (4,470 words) - 22:06, 25 October 2011
  • $ScriptVer = [regex]::matches(($MyInvocation.MyCommand.Name), "(?<=v)[0-9]+(\.[0-9])+(?=.)") [regex]::replace($text, "'", "\'")
    45 KB (4,364 words) - 22:06, 25 October 2011
  • $row.LUN = ([regex]::matches($objSCSIdisk.CanonicalName, "(?<=:)([01]?[0-9]?[0-9]|2[0-4][0-9]|
    6 KB (488 words) - 13:55, 18 April 2012
  • ...: ESX name wrong when known by VC with IP Address (name now extracted with regex to handle name being IP) $ScriptVer = [regex]::matches(($MyInvocation.MyCommand.Name), "(?<=v)[0-9]+(\.[0-9])+(?=.)")
    46 KB (4,545 words) - 22:06, 25 October 2011

View (previous 20 | next 20) (20 | 50 | 100 | 250 | 500)