Questions tagged [string-operations]

Strings or succession of characters can have various representation, either in RAM, files, databases, etc.

Their modification can programmatically be handled by various kind of function, from low level to high level.

Common operations on string can be for example:

55 questions
0
votes
1 answer

Why is PyMySQL not vulnerable to SQL injection attacks?

I am new to PyMySQL and just tried to execute a query: c.execute('''INSERT INTO mysql_test1 ( data, duration, audio, …
felixjrd
  • 65
  • 2
  • 10
0
votes
2 answers

How to split string with specific condition in Javascipt

I'm trying to split string with "&&" operator. but in my string there is some data with the same "&&" operator which I don't want to split. so is there any way or logic to ignore that operator for split data. string - let str = "countryid == 45…
0
votes
1 answer

combine dataframe column with similar name. and concate values with separated by ',' (comma)

input file contains the product and its price on a particular date product 05-Oct-2020 07-Oct-2020 09-Nov-2020 13-Nov-2020 A 66.2 69.5 72.95 76.55 B 368.7 382.8 384.7 386.8 output file…
0
votes
2 answers

How to speed up pandas boolean indexing with multiple string conditions

I have a 73 million row dataset, and I need to filter out rows that match any of a few conditions. I have been doing this with Boolean indexing, but it's taking a really long time (~30mins) and I want to know if I can make it faster (e.g. fancy…
0
votes
1 answer

Spring boot aggregation with String Operations(Trim)

How can I write the below MongoDB operation into Java Springboot code? db.collection.aggregate({ "$group": { _id: { $trim: { input: "$name" } }, doc: { "$first": "$$ROOT", } } }, { …
hodophiler
  • 13
  • 3
0
votes
1 answer

Extract links from a web page in core Java using indexOf, substring vs pattern matching

I am trying to get the links in a web page using core java. I am following the below code given in Extract links from a web page with some modifications. try { url = new URL("http://www.stackoverflow.com"); is =…
Rob Wilkinson
  • 1,131
  • 5
  • 18
  • 34
0
votes
1 answer

How to perform multiple string operations on Bash variable with least steps?

I have gitbash installed in Windows 10 64bit, but I assume the solution I am asking will work in both Linux Git and Win GitBash. I have defined the BRNCH variable to do multiple commit and merge operations involving the current branch, so I have…
Vicky Dev
  • 1,893
  • 2
  • 27
  • 62
0
votes
2 answers

C# String append some string ater first occurance of a string after a given string

I know this seems to be very complicated but what i mean is for example i have a string This is a text string I want to search for a string (for example: text) . I want to find first occurance of this string which comes after a given another…
Can
  • 659
  • 1
  • 7
  • 24
0
votes
0 answers

Retrieve complete group of nested tags

I have a text string (svg-file) where I need to retrieve the complete branch of nested TAGs for a given starting position. The algorithm should return the minimal amount of TAGs with even opening and closings.
Barnabeck
  • 459
  • 1
  • 6
  • 26
0
votes
2 answers

How to print list of lists with justified text, the integer length to rjust() comes from the largest length of string in the lists.

I tried to find the answer but most of the answers use advance functions like map() or zip(). I have to use only string attributes, methods or functions. I could not find answer with string functions or attributes. I need to print a given lists of…
0
votes
2 answers

Read value from json string by string operation

How to read "key" and "key1"'s value from below string. Its json but I can not parse as its very large number and its broke while parsing. so, would like to read the somelongnumber and somelongnumber2 through string…
user3711357
  • 1,425
  • 7
  • 32
  • 54
0
votes
1 answer

how to get the regex from the query param input where the delimiter is "&" and even the regex contains "&"?

i have a scenario where i will get input as path and query param and in the place of value i will get a regex. regex input contains & which is a delimiter in query param. `Input :` '/austin/query.html?dept=([^&]*)&group=([^&]*)' i want to get this…
Vishnu Ranganathan
  • 1,277
  • 21
  • 45
0
votes
1 answer

Need help splitting a data string in Unity

So in my game I'm trying to get some articles from a database and split the data in separate articles. Here's my code: IEnumerator Start () { WWW articleData = new WWW ("http://mywebsite.com/getsomedatabase.php"); yield return articleData; …
Amalox
  • 3
  • 1
  • 5
0
votes
2 answers

how to get the length of the given web element in protractor tests

I would like to find out the length of the variable which I get from the screen. If I use var driverID = element(by.id('driverID')).getAttribute('value') driverID.length it is throwing and error as Property 'length' does not exist on type'Promise…
VonNet
  • 71
  • 1
  • 1
  • 13
0
votes
2 answers

Merge CLOB into one line - ORACLE

I have field in a Oracle database of type CLOB. I need to merge the multiple line of this filed into one line. Here's an example of the content: "

FIT

Core Indy - Compression…

Gan
  • 197
  • 1
  • 4
  • 19