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.
260,608
questions
-1
votes
2
answers
58
views
Add space after specified data using regular expression in Visual Studio
As we all know, Visual Studio has very powerful text editing functions. Now there are hundreds of thousands of data in my txt file. I made a wrong operation, which caused some problems with the data.
...
3
votes
1
answer
55
views
python regex to get text within a pattern defined
I'm working on writing a parser to extract information from the output given below
i need to get all the three texts which are in between '--'. so i wrote a regular expression as below
import re
def ...
0
votes
1
answer
54
views
vuejs @input is getting called only after onfocusout, i want to call it when user is typing
i am trying to use @input on input field in vuejs, but the function assigned to it gets called only after user has stopped typing and the focus is out of the input field, that means it is getting ...
0
votes
0
answers
102
views
Issue in masking AccountNumber and CreditCardNo in a free text field [duplicate]
Please re-open the question as scenarios mentioned below are different than the ones which are in linked question. I am awaiting answer from @bobble.
I am having issue in masking the below strings. ...
0
votes
2
answers
30
views
How to limit/cap values exceeding a certain value in Notepad++
I have this snippet of code in yml:
- Item: Oldman's_Romance
Rate: 50
- Item: Grasshopper's_Leg
Rate: 8000
- Item: Azure_Jewel
Rate: 9000
- Item: ...
0
votes
0
answers
20
views
Add Rewrite Rule Not Returning As Expected
I have the following code snippet in WordPress functions.php file:
add_action('init', function() {
add_rewrite_rule('^explore-destinations\/?(.*)','index.php?tt_destination=$matches[1]', 'bottom');...
-1
votes
2
answers
46
views
Regex with start and end that could be different [duplicate]
I am trying to search and replace in VS code thousands of instances, etc.
Sample String:
[[123|123]] and [[4567|4567]], also [[89|89]].
Finding \[\[.*\|(.*)\]\] and replacing with [[$1]]. It finds [[...
-1
votes
0
answers
49
views
Regex for file Names that begin with T- [duplicate]
I want to all files that start with T- and contain only numbers to return a match:
T-123-32.DOCX
But if the file contains letters it does not return a match:
T-12G-XX-X.DOCX
How can I have it ignore ...
2
votes
1
answer
52
views
How do I fix this Reg ex so that it matches hyphenated words where the final segment ends in a consonant other than the letter m
I want to match all cases where a hyphenated string (which could be made up of one or multiple hyphenated segments) ends in a consonant that is not the letter m.
In other words, it needs to match ...
2
votes
1
answer
70
views
Escaping special characters inside bat file won't act the same
I spend the entire day looking for a solution but without any success. I have a weird bug with a bat file created to unzip 7zip files with. Here is the .bat file:
@echo off
setlocal ...
1
vote
1
answer
46
views
How to match strings having optional group and not containing specific group?
How to match the following cases with regex:
XYZABC
ABC
but not these:
XYZ*ABC
*ABC
in order to capture the ABC part, which can be anything, including a (second) *?
I've tried the following, but it ...
0
votes
1
answer
41
views
Extract all matching font-family attributes from string [duplicate]
I'm trying to extract values of all attributes in an HTML snippet that match font-family:"" pattern
Example input:
`<body lang=EN-ZA style='tab-interval:36.0pt;word-wrap:break-word'>
&...
-4
votes
0
answers
35
views
Using regex for Account Number Extraction [closed]
Using Regex, how to read the accounts from below table in such a manner that from the first row, four IDs can be extracted- 300501798101, 359073848101, 359073848102 and 300501798101 whereas from the ...
0
votes
0
answers
49
views
Javascript regex is working on desktop but not working on mobile
I am using regex in vuejs to manipulate input field data.
below is the code:
<input
v-model="inputValue"
type="text"
:placeholder="placeholder"
:class=&...
1
vote
1
answer
44
views
R split 1 column into several columns based on regex value
I have dataframe like this
col_names
Aceh..........................................................66.29..........................56.49..........................64.01....................................