Skip to main content

Questions tagged [regex]

Also known as regular expression or regexp, a description of a set of strings, often used for searching and validating strings.

0 votes
1 answer
23 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 ...
Shahid's user avatar
  • 95
0 votes
0 answers
43 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 = ...
user avatar
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 ...
Rbvys Punka's user avatar
0 votes
1 answer
47 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 ...
user66001's user avatar
  • 1,265
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 ...
Brian's user avatar
  • 1,045
-2 votes
0 answers
31 views

\G Token in Regex [closed]

I am trying to get a grip of \G token and struggling to understand its proper use. I went through some of the constructs using \G token and I am totally at a loss, how to use them, when to use them or ...
Shahid's user avatar
  • 95
-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 ...
Shahid's user avatar
  • 95
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 ...
Shahid's user avatar
  • 95
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. ...
Vita's user avatar
  • 131
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 ...
Ste3191's user avatar
1 vote
3 answers
86 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 ...
geotso's user avatar
  • 23
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 ...
sit123's user avatar
  • 27
-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 ...
sit123's user avatar
  • 27
0 votes
2 answers
58 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 ...
rmon's user avatar
  • 1
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>&...
pmor's user avatar
  • 368

15 30 50 per page
1
2 3 4 5
141