Top "Substring" questions

Part of a string, or the function/method that returns part of a string

Batch file: Find if substring is in string (not in a file) Part 2 - Using Variables

In a Windows batch file, I have a string 'abcdefg'. I want to check if 'bcd' is in the string, …

string batch-file substring batch-processing findstr
Split String Teradata SQL

I'm looking to split a string in Teradata. The table might look something like this. column1 hello:goodbye:afternoon I'm …

sql database substring teradata
Splitting a file name into name,extension

I have the name of a file like this: name1.csv and I would like to extract two substrings of …

r split substring filenames
Remove prefix from string in Groovy

I need to remove prefix from String in Groovy if it begins the string (no action otherwise). If prefix is …

string groovy substring prefix
Slice a string in groovy

I have a 18 character string I want characters 2-8 from. In python I can do this: sliceMe = "nnYYYYYYnnnnnnnnnn" print sliceMe[2:8] …

java string groovy substring slice
Extract filename with extension from filepath string

I am looking to get the filename from the end of a filepath string, say $text = "bob/hello/myfile.zip"; …

php substring filenames filepath text-extraction
Replacing a substring of a string with Python

I'd like to get a few opinions on the best way to replace a substring of a string with some …

python string substring string-interpolation
If strings are immutable in .NET, then why does Substring take O(n) time?

Given that strings are immutable in .NET, I'm wondering why they have been designed such that string.Substring() takes O(…

c# .net string substring time-complexity
How to extract a substring pattern in Postgresql

I have a column with a lot of inconsistent strings. Some of them contain a substring with a consistent pattern …

regex postgresql substring regexp-substr
what is the fastest substring search method in Java

I need to implement a way to search substring (needles) in a list of string (haystack) using Java. More specifically, …

java regex search substring search-engine