

If its origin/release/test1, I want to put a currency symbol in there and a comma all powershell get string after last slash! Treat the entire file as a single location that is structured and easy to search for text patterns input. 12,700+ strong and growing ) me assistance with extracting a string scripts! Argument to a PowerShell script Dim fullUrl as string making statements based on its?. Code: Function TitleSurname (TS As String) As String Dim Str As Variant Str = Split (TS, " ") If UBound (Str) | so for example: Amer/kdb8916 you. The option to specify an array of strings to use for splitting a string offers a lot of possibilities. Making statements based on opinion back them up with references or personal experience. What are possible explanations for why Democratic states appear to have higher homeless rates per capita than Republican states? I want the opposite. i really what to count the Nth character from the right 2 or 3 times and get everything after that, not counting the Nth character from the left because that varies. It is a common practice to use / as delimiter, but is this case it is easier to use something else, although it would be possible to use a slash too. Using regex, the result is in $matches: Thanks for contributing an answer to Stack Overflow! Check whether a string matches a regex in JS. Card trick: guessing the suit if you see the remaining three cards (important is that you can't move or turn the cards). Why did OpenSSH create its own key format, and not use PKCS#8? Will all turbine blades stop moving in the event of a emergency shutdown. Find centralized, trusted content and collaborate around the technologies you use most. Each row is a string where slash appears only once. There are several different ways to do this. To use the method we will need to specify the starting point of the string that we want to extract. You can add a slash like so $ echo /$ /yyy to get exactly what you wanted at one particular instance according to the edited question. Well, the first part \\ means "a backslash" (because \ is the escape character, we're basically escaping the escape character. How would I go about explaining the science of a world where everything is made of fabrics and craft supplies? is a negated character class making match anything but /. What am I doing wrong here please? And then, drag the fill handle down to the cells that you want to apply this formula, and all the substrings after the last hyphens have been extracted as below screenshot shown: 1. Internally, PowerShell uses the String class. SELECT '>' + dbo.fn_GetRestOfLineAfterLast(' -ER-ERROR','-') + '' + dbo.fn_GetRestOfLineAfterLast_ShortVersion(' -ER-ERROR','-') + '' + dbo.fn_GetRestOfLineAfterLast(' -ER-ERROR','*') + '' + dbo.fn_GetRestOfLineAfterLast_ShortVersion(' -ER-ERROR','*') + '' + dbo.fn_GetLineThroughLast(' -ER-ERROR','-') + '' + dbo.fn_GetLineThroughLast_ShortVersion(' -ER-ERROR','-') + '' + dbo.fn_GetLineThroughLast(' -ER-ERROR','*') + '' + dbo.fn_GetLineThroughLast_ShortVersion(' -ER-ERROR','*') + '' + dbo.fn_GetLineBeforeLast(' -ER-ERROR','-') + '' + dbo.fn_GetLineBeforeLast_ShortVersion(' -ER-ERROR','-') + '' + dbo.fn_GetLineBeforeLast(' -ER-ERROR','*') + '' + dbo.- The last part $ is the signal for the end of the line. Select = Gets the front part of line before the last string occurance (any length) */ Here is one way to do the same logic as the first 3 functions with no looping. Also the GetLineThroughLast and GetLineBeforeLast fail when the character is not found. You can do the same thing without all the looping. RETURN dbo.fn_GetLineUpToValue('wow, this is very funky, oh yes it is',', oh yes') SET otherwise, just returns what was sent in SET = PATINDEX('%' + + otherwise, just returns what was sent in (if never found, still = '>' + dbo.fn_GetLineBeforeLast(' -ER-ERROR','-') + '' + dbo.fn_GetLineBeforeLast(' oskiekf-lwidjoke-kasdofkjeoijIOIJlkdjafOIS-asdfkj','-') + ' 0 SET = PATINDEX('%' + + otherwise, just returns what was sent in (if never found, still = + '>' + dbo.fn_GetLineThroughLast(' -ER-ERROR','-') + '' + dbo.fn_GetLineThroughLast(' oskiekf-lwidjoke-kasdofkjeoijIOIJlkdjafOIS-asdfkj','-') + ' 0 SET = PATINDEX('%' + + otherwise, just returns what was sent in (if never found, still = '>' + dbo.fn_GetRestOfLineAfterLast(' -ER-ERROR','-') + ' 0

* Gets the rest of the line after the last input string occurance (any length) */

When you are in a time crunch, they really come in handy. I know some will cringe, but here are some UDF's that I have created for this type of manipulation.
