260,742
questions
-4
votes
0
answers
36
views
Convert string to a dd/mm/yyyy date format no matter the strings format in JavaScript [closed]
I am trying to create a script in JavaScript where a user can enter a date, can be any format - such as:
September 2021 - November 2024, 01/05/23 - 04/02/24, Sep 2021 - Jan 2024
The possibilities are ...
-1
votes
5
answers
60
views
How to extract placeholders in a string
Say I have a string like:
My name is <<yourName>> and I am working in the <<Team Name>> team\\n as a <<yourTitle>>.
How can I extract the <<placeholders>&...
0
votes
2
answers
36
views
Regex function that identifies either first char or whole word
I'm trying to develop a regex pattern to use in a for loop. I have two lists - one is a cleaned set of keywords from a document, the other are a set of tags that I want to used the cleaned text to ...
0
votes
1
answer
23
views
Remove index.php from URL in Nginx
my URLS should be in this format:
https://www.example.com/author/article-title
But Google tries to scan also:
https://www.example.com/index.php/author/article-title
I tried to solve this on Nginx ...
2
votes
2
answers
55
views
How to use posix regexp operator for substring match
I'm trying to move from ILIKE to Postgres ~* operator. Tables have bpchar columns (cannot changed). Tried in Postgres 12
create temp table test ( tasudok char(25), nimetus char (100) ) on commit drop ;...
-1
votes
2
answers
47
views
How to split a code looking like '10abc' in numbers then letters? [duplicate]
I would like to split (in python) 10abc (or codes that start with any number of numbers followed by any number of letters) into 10 and abc (one string with the numbers and one string with the letters)....
0
votes
1
answer
54
views
regex for checking URL's wildcard for both subdomain and top level domain?
Is it possible to modify this current php regex to allow '*example.*'?
$wildcardUrlPattern = '/^(https?:\/\/)?(\*[a-z0-9-]*\.)?[a-z0-9-]+(\.[a-z0-9-]*)*(\.\*[a-z0-9-]*)?$/i';
// Test URLs
$urls = [
...
-2
votes
2
answers
72
views
Replace (~) with Double Quote (") in C# [closed]
I have a string that is in an array. I am trying to find all the ~ tilde chars in a string and replace them with " double quote. This is a conversion, and I had to replace all the " with ~ ...
1
vote
1
answer
35
views
Find procedure name in all other procedures
procedure 1:
create or replace procedure pro_1()
as
$$
begin
raise info 'pro1';
end
$$
language plpgsql;
procedure 2:
create or replace procedure pro_2()
as
$$
begin
raise info 'pro.1'...
1
vote
0
answers
36
views
Tesseract.js to Scan a Ticket and Retrieve Information [closed]
I'm using tesseract.js to scan a train ticket and extract specific information, such as the PNR number, train number, coach, and seat number. Below is the code I have written:
import { Request, ...
3
votes
3
answers
110
views
Regular Expression to Prohibit Certain Zero Values and Leading Zeros
I need a regular expression that accomplishes the following:
Prohibits input values like:
012
0.00
0
0.0
0.000
Allows input values like:
1
0.01
1.12
10
10.5
Here's the regular expression I am ...
1
vote
0
answers
29
views
Regexp to select everything except the specified string [duplicate]
I want to write a regexp that selects everything except the given sequence.
the sequence can be at the beginning of a word
the sequence can be in the middle
I was able to write something like this: (...
-1
votes
0
answers
18
views
How to do a replace using regex of a sentence with variable content in the middle and the end containing "/" [duplicate]
I'm having difficulty replacing content where I only know the beginning and end, where it's also a problem to replace due to ("/"). This is the line of code I need to remove.
<div class=&...
-1
votes
1
answer
71
views
Extract values from string using regex [closed]
I am using this regex to extract 3 values from a string:
'Rgba\(\n.*\n.*?(?<digits0>\d{1,3},)\n.*?(?<digits1>\d{1,3},)\n.*?(?<digits2>\d{1,3},)\n.*\n.*\n.*
I'm using this to capture ...
-1
votes
1
answer
39
views
.htaccess virtual directory as a $_GET parameter
While working with multiple databases I have a database ID stored in $_SESSION and I would like to pass that ID within the url instead, as such:
Now: my.domain.app/hrm/employees
New: my.domain.app/...