python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
rust str slice from string
"A slice is a kind of reference, so it does not have ownership."
The following code is simplified. It needs to return a slice using a match. All but one match arm return a string slice. On...
A Boston
Votes: 0
Answers: 3
re.match function doesn't detect line in file
I wanted to detect in which line, the section '' is. I used python to it.
I used re.match(), but it does not detect that obvious line:
import re
filereader = open("template.html", "r&qu...
Eqsz
Votes: 0
Answers: 1
R match function with conditions
I have a dataframe (Df1) that needs to be updated with a 2nd dataframe (Df2).
If the "Bird.ID" is found in Df2, then the column "Status" takes the "Alive" status in Df1 (...

Andre230
Votes: 0
Answers: 2
Finding if a string start with 0 or more spaces followed by a string that might contain metacharacters
I need to find if a string start with 0 or more spaces followed by a comment string I don't know in advance, so I though of just constructing the pattern:
local pattern = "^(%s" .. comment_s...

Ludo
Votes: 0
Answers: 1