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

Questions tagged [regex]

Regular expressions provide a declarative language to match patterns within strings. They are commonly used for string validation, parsing, and transformation. Specify the language (PHP, Python, etc) or tool (grep, VS Code, Google Analytics, etc) that you are using. Do not post questions asking for an explanation of what a symbol means or what a particular regular expression will match.

regex
-1 votes
1 answer
27 views

Bookmark Lines Between Two Regex Patterns in Notepad++ Without Including the Patterns Themselves [duplicate]

I have a list, and here is an example snippet: Newii 27,807,147 Supd 26,518,465 Ns. 26,175,538 Mai 24,930,812 Gas 0623,901,055 TEim 20,213,631 Tes GrV 18,968,412 Mytyttyst y htththt hyhyh October 2013 ...
Pubg Mobile's user avatar
0 votes
1 answer
18 views

Read Response body and assign into one variable in JMeter

I need to read authId value from below response returned by one of the Http Request item in JMeter and assign into in one variable under JSON extractor . "Should I use $.ApiResponse.data.authId&...
Shailesh Sahu's user avatar
0 votes
0 answers
15 views

Regex unicode categories \p{L} combined with a Python formatted string [duplicate]

I would like to write a regular expression in Python that is a formatted string and includes a unicode category. The regex would look like this: import regex as re mystring = "abc" m = re....
Oriane Nédey's user avatar
1 vote
1 answer
31 views

Bookmark last comma-separated value before specific separator using Notepad++ regex

I have a list of text data formatted as follows: Drtyjtyjnt 11,825,222 Ftyryer 8,823,623 Strtrtuperd 8,542,448 Ts 7,153,156 Supd 7,122,304 Su.3 6,920,743 Supld dddd tgtgtg Sd April 1991 ///////////////...
Pubg Mobile's user avatar
0 votes
1 answer
48 views

Regex not matching group at the end of the string, even though $ is included

The string format is similar to: 1) some question text A)option B) option C) option D) option 2) some question text. A) option B) option C) option D) option etc.....
Roger Li's user avatar
0 votes
0 answers
23 views

Select2 ajax based results filtering based on regex on client and server side

I have implemented select2 in codeigniter for ajax based results and its working perfectly. But the challenge I am encountering is that the data in database is not sanitized e.g E.C.G Machine ECG ...
Muhammad Asif Raza's user avatar
1 vote
2 answers
49 views

Append to a line only if regexp is found

I have the following Ansible code: --- - name: skip fail2ban in iptables checkmk plugin hosts: localhost gather_facts: no tasks: - name: modify plugin ansible.builtin.lineinfile: ...
dan's user avatar
  • 3,497
0 votes
1 answer
26 views

"if regex.test" doesn't works properly on javascript vuejs router [duplicate]

const router = createRouter({ history: createWebHistory(), routes, }); // ... const allowedToAnonymous = [ /^\/login$/g, /^\/signup$/g, /^\/home$/g, /^\/emailconfirm\/[0-9a-zA-Z]{8}$/g, ...
Jeong Hansol's user avatar
1 vote
1 answer
47 views

Removing string between two specified strings in Python 3 [duplicate]

I am working on an NLP project that requires me to remove computer code from a piece of text. The code is encased between the tags <pre><code> and </code></pre>. Now I could do ...
Namrata Banerji's user avatar
0 votes
0 answers
9 views

Non-word characters in SHAP's default tokenizer

My basic question is: why are the non-word characters making it into my SHAP output, and how do I prevent it? I am applying SHAP to a black-box machine learning model fn_predict_proba() (the model ...
David Kaufman's user avatar
-4 votes
0 answers
43 views

Why is using regex group feature on Python giving different outputs? [duplicate]

import re string1 = "aaabaa" zusuchen = "aa" #1 m_start = re.finditer(fr'(?=({zusuchen}))', string1) results = [(match.start(1), match.end(1)-1) for match in m_start] for z in ...
Hotbread's user avatar
-3 votes
0 answers
53 views

Getting text from a string [duplicate]

I am using this pattern below <a href=.*##ENCLICKTAG##2104.*\s*<\/a> To extract the first "a" tag content from this String below <a href="##ENCLICKTAG##2104&amp;&...
el bayames's user avatar
0 votes
1 answer
39 views

Detecting OR operator sequences and wrapping their content in a parenthesis when building a query with PHP

I made the following PHP code to build a query based on user input, where they can choose the condition and the operator and the resulting query would be printed on their screen every time they added ...
Victor Canela's user avatar
-1 votes
0 answers
27 views

Bash Regex Start Anchor w/Character Classes Not Working [closed]

GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu) Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html $> var=39Q08a ...
Adam D.'s user avatar
  • 189
-1 votes
0 answers
11 views

query in elastic using regular expressions

I want to find the value of quality:0.60 from elastic using kibana. I have a log field containing the following text inside 1721901536 [01;30mDEBUG [00m tracker.cpp:92 [01;30mTracker[bf19311e0d65] ...
Ilnaz's user avatar
  • 1

15 30 50 per page
1
2 3 4 5