Questions tagged [regex]
Also known as regular expression or regexp, a description of a set of strings, often used for searching and validating strings.
2,107
questions
0
votes
1
answer
24
views
How to correct punctuation with a regex in Notepad++?
My sample text is this:
This is a demo . Of all the places you want to go here! Superb work !
Is your name John ? Or is it that you are hiding your name? Seems to be a good work.But as you know this ...
0
votes
0
answers
44
views
Notepad++ Match pattern across lines
I have a file with pairs of variables separated by other text:
THING_1
Number_Of_Thing = 7
Other lines
Type_Of_Thing = 1
THING_2
...
I want to find each pair of Number_Of_Thing = 7 and Type_Of_Thing = ...
0
votes
1
answer
19
views
Regex pattern to find all matches in string with conditions
I am currently stuck with a regex problem.
I have a string:
Take dog, dog, dog, cat, dog;
Dont dog, dog, cat, dog;
How would I match all of the "dog" and skip "cat" with pcre2 ...
0
votes
1
answer
48
views
How to escape an already escaped string in Regex
I am using the below code, as part of a script to turn a canonical name into a distinguished name.
However should I present the CN "test.example.com/This\/is\/a\/escaped/\space/\OU/person, I get ...
1
vote
1
answer
44
views
How to Preend or Append File Name to Reflect Number of Pages in PDF using "qpdf" and "perl"
I am running the script at the bottom as a one-liner but have expanded for ease of reading.
Assume the directory contains the following file: File (11).pdf.
When the script executes, it simply repeats ...
-1
votes
1
answer
47
views
Add an underscore after numbers in Notepad++
I have a scenario where I have list with some numbers in Notepad++. Here is the sample text:
1-This is item one
2_This is item two
3This is item three
4_This is item five
5This is item six
6 This is ...
0
votes
1
answer
47
views
Insert a char just before a particular set of words using Regex
I want to use GREP/Regex in Adobe InDesign. Following is the sample data:
Rat: a mammal. Camel: an animal who lives in desert. An aeroplane: a machine that flys. The muddy water: water full of mud and ...
1
vote
0
answers
19
views
Find regex pattern and use it in the next set of repeating lines until another like it replaces it
I'd like to find a pattern that rapeats every few sets of the second where I'd like to move it to.
The only example I could think of right now is a file listing; but I've needed this so many times. ...
0
votes
1
answer
28
views
regexp multiple lines grep
I am looking for a correct regexp to return the first match and the new line.
Let's say the logfile is like:
Warning-[ABC] blablabla$
/path1/path2/path3/file
The dollar at the end of the first line ...
1
vote
3
answers
87
views
Which regex can I use to replace Greek capital vocals with tonos to ones without it, in Bulk Rename Utility application?
I would like to replace in a lot of filenames, the Greek capital vocals with tonos, with the ones without it:
Ά > Α
Έ > Ε
Ή > Η
Ί > Ι
Ό > Ο
Ύ > Υ
Ώ > Ω
I know how to replace them ...
0
votes
0
answers
28
views
Apple Numbers RegEx not working as expected (Negative lookahead)
RegEx.Extract Negative lookahead help needed due to what works in RegEx Support website does not work in Apple Numbers
(?<=XYZ((?!\d+).)*)\d+
This is invoice from company XYZ - 1234545 product name ...
-1
votes
1
answer
21
views
regex to find non-price consecutive digits not immediately after certain word for Apple Numbers
0
How to find invoice number from different companies which may have different order of invoice number, unit cost and total cost?
Following is specific example of a company XYZ which I need to get ...
0
votes
2
answers
59
views
adding quotes to set of comma separated IP addresses in notepad++
Please, I have a set of comma separated IP addresses and I want to add quotes to each IP addresses to that I can assign the set a powershell variable and parse each IP address strings in the variable ...
0
votes
2
answers
65
views
How to extract a text in between two patterns (potentially containing floating lookbehind) with only one invocation?
I'm trying to match any characters (except line break characters) in between xxx<1+ whitespaces>" and whitespace.
The format of the input string is the following:
xxx<1+ whitespaces>&...
0
votes
1
answer
52
views
Match a User That Starts With a Single Letter
I've been handed a script written by another and been asked to modify it according to their needs. There's one line that needs to be altered:
if [ "$user" == "nobody" ]
This ...