About 65 results
Open links in new tab
  1. string - Extract a substring using PowerShell - Stack Overflow

    The Substring method provides us a way to extract a particular string from the original string based on a starting position and length. If only one argument is provided, it is taken to be the starting position, …

  2. How to extract a certain part of a string in powershell

    Sep 14, 2017 · How to extract a certain part of a string in powershell Asked 8 years, 5 months ago Modified 8 years, 5 months ago Viewed 22k times

  3. What is the equivalent of str.Substring in PowerShell?

    Sep 6, 2023 · Similarly, you can use the .NET .Split() method to split a string by a given, verbatim character and combine it with PowerShell's enhanced indexing to allow you to reference elements …

  4. Matching a substring with Regex in Powershell - Stack Overflow

    May 1, 2025 · Matching a substring with Regex in Powershell Asked 9 months ago Modified 9 months ago Viewed 123 times

  5. Find a substring in a string with PowerShell and trim

    Dec 16, 2018 · 4 I am trying to trim a string with PowerShell. Let's say you have the following string: Test test test test test test /abc test test test I want to 'find' the '/a' in the string and ultimately get the "abc" …

  6. Substring in PowerShell to truncate string length

    Jan 14, 2015 · Is it possible in PowerShell, to truncate a string, (using SubString ()?), to a given maximum number of characters, even if the original string is already shorter?

  7. How do I find the position of substring in PowerShell after position x ...

    Apr 23, 2019 · Is there a simple way to do so; I can't find any. Am I obliged to scan character by character? I don't want a string as return, but a position so do not suggest SubString.

  8. powershell - Powershellv2 - remove last x characters from a string ...

    $_.subString(0,-37) $_.subString(-37) but these didn't work Is there a way to get rid of the last x characters?

  9. substring - Powershell .contains () check without casesensitive - Stack ...

    Oct 27, 2022 · I'm having a larger foreach loop code but need to get below code executed without casesensitive. Below code snippet returns false, how can I ignore the casesensitive .contains() and …

  10. Extract a substring with a regular expression in PowerShell

    Extract a substring with a regular expression in PowerShell Asked 12 years, 7 months ago Modified 2 years, 7 months ago Viewed 51k times