Category "string"

split strings that contain more than one substring

I have a list of strings names names = ['Acquaintance Muller', 'Vice president Johnson Affiliate Peterson Acquaintance Dr. Rose'] I want to split the strings th

MarkLogic matches function with regular expression

I am new to XQuery so could you please help me to understand what is § and §.*$ in below MarkLogic XQuery: if (matches($cite, '§'))

How to enter string value into Delta PLC?

I would like to insert string value into PLC, I searched a lot of information but unable to get an accurate method to do it. The plc that I using is DVP-14SS2 a

Array and string in ruby

Hi amazing stackers! date = "10/02/2021" d1 = date.split("/") d2 = d1.to_s puts d1 puts d1.class puts d2 puts d2.class in the above code, d2 shows the data typ

String Split function in MySQL

can anybody tell me how to implement a split function in mysql which behaves like Javascript split. I want a function like this SELECT Split('a,b,c,d', ',') A

Syntax error when parsing variable from XML within an SQL stored Procedure

So, I'm trying to run a stored procedure within another stored procedure and parse out some XML data into a variable. It is giving me a syntax error on the fir

Convert a short DateTime string with date and time to DateTime

Having trouble with my Android project here trying to convert a string of DateTime into an actual DateTime object. here's the code I wrote: string strDateTime =

Python how to add create blocks from multiline text

I have the textblock below and I am trying to separate into 3 blocks with regex. When you see the name field it would start a new block. How can I return all

How to print strings and integers in the same line?

I'm trying to print each item in the following two lists: lNames = ['John','David','Michael'] lAges = [45,14,32] with the format: "Person 0, Name: John, Age 3

Program to find if a string is a palindrome keeps on failing. Even after using toLowerCase() command for both strings, output doesn't come

import java.util.Scanner; class Palindrome_string { public static void main() { System.out.println("\f"); Scanner sc = new Scanner(Syste

Convert into DateTime format ISO8601

I am receiving the input date as below. 2022-05-05 18:08:13.311951 +0:00 And I am trying to convert this to below format which follows ISO8601 format. 2022-05-

How to check if values in first dataframe are contained or match values in another dataframe

I am using R to work with some dataframes. My issue is related on how to check if values in a variable in a first dataframe match with values in another datafra

I need to modify (the lower case method ) to support the letter Arabic language

How can I modify or replace the .lower method of strings to support Arabic text? for example, there's a difference between "سارة" and "&

RegExp Match all text parts except given words

I have a text and I need to match all text parts except given words with regexp For example if text is ' Something went wrong and I could not do any

Duplicate Encoder JavaScript, try to use indexOf but the output is still incorect

convert a string to a new string where each character in the new string is "(" if that character appears only once in the original string, or ")" if that charac

How do I create a Java string from the contents of a file?

I've been using the idiom below for some time now. And it seems to be the most wide-spread, at least on the sites I've visited. Is there a better/different way

When using the substr() string function, Why is a litteral carriage return twice as long as a line feed character "\n"?

When typing the following code ... (easily testable with W3schools' editor) <?php $basecss = '.class { margin-bottom:0 } /*1234567890'; $basemincss = ".

Need advice to structure and modify a JSON-payload in Java

Here is a simplified JSON payload that I want to be able to change (the original one is much longer) { "request": { "jsonRequest": { "Alpha": {

How to get all fuzzy matching substrings between two strings in python?

Say I have three example strings text1 = "Patient has checked in for abdominal pain which started 3 days ago. Patient was prescribed idx 20 mg every 4 hours." t

Simple way to convert time text strings to ints for numeric operation in Qliksense data load editor

TimeTemp displays as such 168@06:43:23AM stationTime displays opening and closing times of service area stations as such 6AM-10AM I’ve separated TimeTemp