tagged [substring]
How do I get a substring of a string in Python?
How do I get a substring of a string in Python? I want to get a new string from the third character to the end of the string, e.g. `myString[2:end]`. If omitting the second part means 'to the end', an...
Fastest way to check a string contain another substring in JavaScript?
Fastest way to check a string contain another substring in JavaScript? I'm working with a performance issue on JavaScript. So I just want to ask: what is the fastest way to check whether a string cont...
- Modified
- 23 Jul at 01:44
SQL SELECT everything after a certain character
SQL SELECT everything after a certain character I need to extract everything after the last '=' ([http://www.domain.com?query=blablabla](http://www.domain.com?query=blablabla) - > blablabla) but this ...
- Modified
- 29 Jan at 10:16
Qt. get part of QString
Qt. get part of QString I want to get `QString` from another `QString`, when I know necessary indexes. For example: Main string: . I want to create new `QString` from first 5 symbols and get . first a...
Fastest way to remove first char in a String
Fastest way to remove first char in a String Say we have the following string If we want to remove the first character `/` we can do by a lot of ways such as : But, really I don't know which one has t...
- Modified
- 9 Aug at 08:31
Find all index position in list based on partial string inside item in list
Find all index position in list based on partial string inside item in list I need the index position of all items that contain `'aa'`. I'm having trouble combining `enumerate()` with partial string m...
How to check if a string contains a substring in Bash
How to check if a string contains a substring in Bash I have a string in Bash: How can I test if it contains another string? Where `??` is my unknown operator. Do I use `echo` and `grep`? That looks a...
Find the nth occurrence of substring in a string
Find the nth occurrence of substring in a string This seems like it should be pretty trivial, but I am new at Python and want to do it the most Pythonic way. I want to find the index corresponding to ...
Get Substring - everything before certain char
Get Substring - everything before certain char I'm trying to figure out the best way to get everything before the - character in a string. Some example strings are below. The length of the string befo...
How do I check if a string contains another string in Objective-C?
How do I check if a string contains another string in Objective-C? How can I check if a string (`NSString`) contains another smaller string? I was hoping for something like: But the closest I could fi...
- Modified
- 14 Nov at 11:32
Find string between two substrings
Find string between two substrings How do I find a string between two substrings (`'123STRINGabc' -> 'STRING'`)? My current method is like this: However, this seems very inefficient and un-pythonic. W...
Need to get a string after a "word" in a string in c#
Need to get a string after a "word" in a string in c# i'm having a string in c# for which i have to find a specific word "code" in the string and have to get the remaining string after the word "code"...
Get value of a string after last slash in JavaScript
Get value of a string after last slash in JavaScript I am already trying for over an hour and cant figure out the right way to do it, although it is probably pretty easy: I have something like this : ...
- Modified
- 22 Sep at 09:55
How to extract the substring between two markers?
How to extract the substring between two markers? Let's say I have a string `'gfgfdAAA1234ZZZuijjk'` and I want to extract just the `'1234'` part. I only know what will be the few characters directly ...
Python: Find a substring in a string and returning the index of the substring
Python: Find a substring in a string and returning the index of the substring I have: - a function: `def find_str(s, char)`- and a string: `"Happy Birthday"`, I essentially want to input `"py"` and re...
What is the best way to do a substring in a batch file?
What is the best way to do a substring in a batch file? I want to get the name of the currently running batch file the file extension. Thanks to [this link](https://stackoverflow.com/questions/343518...
- Modified
- 22 Jan at 16:57
Substring index and length must refer to a location within the string
Substring index and length must refer to a location within the string I have a string that looks like "www.example.com/" is 18 fixed in length. I want to get the "aaa/bbb" part from this string (The a...
Regex to extract substring, returning 2 results for some reason
Regex to extract substring, returning 2 results for some reason I need to do a lot of regex things in javascript but am having some issues with the syntax and I can't seem to find a definitive resourc...
- Modified
- 15 Aug at 10:34
Substring in excel
Substring in excel I have a set of data that shown below on excel. And I want to separate the data in each cell look like this. what is the function in excel that I can use
- Modified
- 16 May at 08:43
C# float.Parse String
C# float.Parse String I'm new in C# and need to read `float` values `(x, y, z)` from file. It looks like: > 0 -0.01 -0.0020.000833333333333 -0.01 -0.002 If Iam trying My code for reading values from e...
- Modified
- 20 Jun at 09:12
How to use string.substr() function?
How to use string.substr() function? I want to make a program that will read some number in string format and output it like this: if the number is 12345 it should then output 12 23 34 45 . I tried us...
Shorten string without cutting words in JavaScript
Shorten string without cutting words in JavaScript I'm not very good with string manipulation in JavaScript, and I was wondering how you would go about shortening a string without cutting any word off...
- Modified
- 24 Aug at 19:12
When getting substring in .Net, does the new string reference the same original string data or does the data get copied?
When getting substring in .Net, does the new string reference the same original string data or does the data get copied? Assuming I have the following strings: I am hoping that in the above example `s...