Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [substring]

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

substring
2 votes
1 answer
72 views

String allocated on the heap is corrupted when being accessed outside of the function C

I was trying to write some code in C to replace a substring in a given string following this tutorial. I managed to get it working, however one of the problems with the function is that it will result ...
Ali Awan's user avatar
  • 322
2 votes
4 answers
48 views

Split String by delimiter position using oracle SQL 28.9 X 30.6

I have a string which contains a '48.6 X 90.6' at COLUMN DIE_SIZE. I want to split this string into size_x and size_y. I can only find a way to split the die_y Example Strings: DIE_DIZE 48.6 X 90.6 ...
prakasit su's user avatar
3 votes
1 answer
69 views

Extracting specific substrings from a text field in SQL

Consider this snippet code to regenerate the result set: CREATE SCHEMA "clean"; CREATE TABLE "clean"."InvoiceFact" ( "InvoiceTitle" TEXT ); INSERT INTO &...
sci9's user avatar
  • 776
-5 votes
1 answer
55 views

Return longest palindromic substring [Java] [closed]

Here is longest palindrome solution I have written using dynamic programming with memoization. It passes several of the test cases (46/142), but the solution is not at 100% on Leetcode. Time limit is ...
Reena Puthota's user avatar
0 votes
2 answers
50 views

Is there a way to obtain a list separated by comma as the output of str_extract_all instead of the default output in R?

I have searched high and low and nobody seems to have asked that exact question, so I'm at loss. I have a data frame with a couple columns. One of this column contains various sentences that don't ...
Laue28's user avatar
  • 1
3 votes
2 answers
72 views

How do I get variable length slices of values using Pandas?

I have data that includes a full name and first name, and I need to make a new column with the last name. I can assume full - first = last. I've been trying to use slice with an index the length of ...
J Web's user avatar
  • 65
0 votes
4 answers
59 views

How do I extract substrings of a dataframe column by referencing another column?

Let's say I have a dataframe as below: import pandas as pd nhl_df = pd.DataFrame({ "team": ["Tampa Bay Lightning", "Boston Bruins", "Toronto Maple Leafs", ...
JJin's user avatar
  • 1
-4 votes
1 answer
33 views

how to extract files from a list using substring filter [duplicate]

I have a list of files from os.listdir like: TXSHP_20240712052921.csv TXSHP_20240715045301.csv TXSHP_FC_20210323084010.csv TXSHP_FC_20231116060918.csv how do I extract only the ones where 'FC' is ...
Ben Smith's user avatar
  • 362
1 vote
1 answer
55 views

Join two df and cut second df field by first df field condition during join?

I have two df - first contains start and end position, like id start end 1 4 8 2 2 6 2 5 7 And second df with id-string id string 1 my beautiful data 2 lorem ipsum Join &...
user453575457's user avatar
1 vote
1 answer
57 views

Convert optional substring to string in Swift

Apple's documentation and many articles suggest you can convert a substring (string.subsequence) to a string just by calling String(substring)and in fact this works. let str = "Hello world" ...
user6631314's user avatar
  • 1,868
0 votes
1 answer
69 views

Need help in using SQL split by delimeter, and get data from another table from the results of split data [duplicate]

I have 2 Tables Table -1 Soltid SlotName Amount 1 Slot-1 100 2 Slot-2 150 3 Slot-3 150 4 Slot-4 125 5 Slot-5 100 6 Slot-6 100 7 Slot-7 150 8 Slot-8 125 9 Slot-9 100 10 Slot-10 150 11 Slot-...
Sathesh Kumar's user avatar
-1 votes
1 answer
57 views

How to find the longest subsequence containing all vowels in order in a string in Python?

I am working on a problem where I need to find the length of the longest subsequence in a given string that contains all the vowels (a, e, i, o, u) in order and no vowels out of order. The vowels can ...
Vokekov's user avatar
0 votes
1 answer
39 views

How to Parse text in one column to different columns in TSQL?

I have data in the following format in a column: Follow-up Date (use start date from OTO): 8-15-2024 Contract Type (Competitive Win, Meter, New Product Line, Not Eligible): Meter Go Live Date (...
Monu M's user avatar
  • 1
0 votes
0 answers
20 views

Cut a number from row and insert into new column

I have a table where one column contains a long description with a street number and I want to pick that value , like we have three rows below: Streetnum_12345678 /*+ INDEX(@"SEL$EECA6CD9" &...
saurav kumar's user avatar
0 votes
0 answers
17 views

Extract alphabetic_string from a field in Teradata

I have a table (table1) with some columns say (col1, col2, col3). I am trying to extract alphabetic_string from col1. The example data in Col1 is ABCDEF, GON-F RFF RED, IV CATH INTRO 22G X 1", BD ...
Animesh Jain's user avatar

15 30 50 per page
1
2 3 4 5
646