Questions tagged [regex]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
14 views

Regex first column header csv

What would the regex be for matching the first column header in a csv file? id,field1,field2 1,n/a,n/a 2,n/a,n/a ... I just safely want to match id
user avatar
0 votes
1 answer
37 views

How to remove lines that not containing any uppercase letters or lowercase letters or numbers notepad++ after ":"

I've never used a regex before. I'm looking for a regex command that can help me bookmark lines AFTER ":" that has: at least 1 uppercase letter at least 1 lowercase letter at least 1 number ...
user avatar
0 votes
0 answers
31 views

Regex adding to filename by find replace (Java/ECMA script regex)

I am trying to append to a filename with regex replace.This can be done by many ways for sure but i need to do it with regex, Need select filename and replace it with filename+newtext so in example i ...
user avatar
  • 1
-1 votes
2 answers
23 views

Regex: Add html tag at the beginning of each line (which has no starting tag)

I need to add <p class="mb-40px"> at the beginning of each line that does not have this tag. For example: <p class="mb-40px">moderniseringen av de omgivande ...
user avatar
  • 730
0 votes
2 answers
24 views

Regex: Find and delete html tag which is contained in another tag

I have 2 paragraphs, with html tag <p class="mb-40px"></p> Inside this tag there is text and another <p..> tag I need to find and delete html tag which is contained in main ...
user avatar
  • 730
0 votes
1 answer
11 views

Skip a character from character class

I am using following grep code to search single arabic characters only in Adobe Indesign: \b[\x{0600}-\x{06FF}\x{0750}-\x{077F}]{1}\b All is working fine except that I want to skip just one character ...
user avatar
  • 29
3 votes
1 answer
47 views

How to change syntax highlighting of URLs in Visual Studio Code

One answer is to just turn off linkifying of URLs altogether: "[html]": { "editor.links": false }, But what I'm trying to do is keep that feature and turn off the actual ...
user avatar
  • 953
0 votes
1 answer
18 views

sed remove with regex

I have code that contains #ifdef CEEDLING_TESTS void scheduler_task_delay_update(uint8_t task_index) { #else static void scheduler_task_delay_update(uint8_t task_index) { #endif I want to remove ...
user avatar
0 votes
1 answer
25 views

Regex to filter webpages names that contains text that you want exclude

I need to filter webpages names when I using DownThemAll! (a firefox extension) Some parts of names are structured like this: /forum/viewtopic.php?t=156345 /forum/viewtopic.php?t=458935 /forum/...
user avatar
0 votes
0 answers
41 views

Can I use regex in find path?

env = bash, centos7 My goal is to delete jenkins workspace cache files under specific path, except for today's. Successful command : cd /jenkins/jenkins/workspace/CMSvc_Build/caches/modules-2/files-2....
user avatar
0 votes
0 answers
20 views

Regex: isolate 1st column of a CSV file

Long time copy-paster, first time poster. I need to get only the first column in a CSV with the following format: "device name","IP address", ""CN=Person Name" ...
user avatar
  • 1
0 votes
0 answers
13 views

Epos print modification

I have a POS system with thermal epos network printers that print 80 mm wide Recently i have added 2 portable printers from Epson tm-p80 that print 56 mm Now the print format from the cash register is ...
user avatar
0 votes
1 answer
30 views

How can I use Powershell to rename all files where the name has the format "digits [space] name with spaces" to "digits [hyphen] name with spaces"?

I have a lot of files with names of the format "digits [space] name with spaces" or "(digits) [space] name with spaces" e.g.: 23 Filename 23 with spaces.txt (47) Filename 47 with ...
user avatar
  • 41k
1 vote
1 answer
35 views

Remove the first blank line from every document Notepad++

I use markdown with YAML frontmatter as below. I want to remove the first blank line that appears in every document using Notepad++. I would appreciate if anyone could help me to do this. Thanks in ...
user avatar
1 vote
1 answer
44 views

Regex: Concatenate/connect the letters in words separated by space in html tag

I have this html tag: <title>c o n n e c t s t h e l e t t e r s i n w o r d s</title> Must Become: <title>connects the letters in words</title> I try this, but doesn't ...
user avatar
0 votes
0 answers
14 views

Validating MS Teams channel names, team name and channel address in one go //OwMyHead

Validating MS Teams channel names, team name and channel address in one go! However having problems checking that Teams channel name or Teams team name doesnt include a channel address... I have this ...
user avatar
0 votes
1 answer
33 views

How to create a regex for a Notepad++ search over a range of integers in a CSV file rows

I have a have CSV file containing entries with ranges like [12, 22[ that I want to replace with ranges like [12; 22[. What is the regex to use in Notepad++ in this case ? sample row of my dataset: 1,2,...
user avatar
  • 3
0 votes
0 answers
32 views

Identifying URL structure with Regex

Im trying to find the right regex pattern to extract the relevant parts out of my websites URLs: The URL structure is like that: https://my.website.com/#/part1/part2/part3/part4/facebook.com,superuser....
user avatar
-1 votes
4 answers
100 views

How to delete all files (or the entire content of all files) with less than 250 words with Regex?

Is it possible to delete all files (or the entire content of all files) with less than 250 words? I try this regex, but needs to be improved a little bit. Can anyone help me? Find: (?s)(.*?(\w+\s?){1,...
user avatar
0 votes
1 answer
25 views

Regex: Find lines that do not start with html tag, but end with other tag, and make replace at the beginning

I have this lines, I need to make them all paragraph, <p class="mb-40px"></p> The first 2 lines, doesn't have html tags, but ending with inappropriate tag. And the third line has ...
user avatar
  • 730
0 votes
2 answers
64 views

Make TSV out of multi-line list

I have a list of items in which each item has multiple lines. The token to separate the items is unique (per item, HTML <li>) and I've only seen instances of the text that are contained within a ...
user avatar
  • 13
-1 votes
3 answers
69 views

Regex: Delete all words/strings on the lines, except html tags

I want to delete all the lines with words, except html tags: <p class="bandy">Cars and jupiter</p> Comentezi folosind contul tău WordPress pentru a nu ...
user avatar
  • 730
-1 votes
3 answers
127 views

Regex: Find all html tags that contain some other particular html tags

I have some html tags starting with <p class="mb-40px"> and end with </p> The first tag has in it some other tags such as </li> </ul> </div> and spaces and \n ...
user avatar
  • 730
-3 votes
2 answers
37 views

Regex: Select all html links except one particular html link <a href="https://..." /></a>

I have more html links such as: <a href="https://liber5fg.files.wordpress.com/2011/02/picture-183.jpg"><img loading="lazy" blah blah" /></a> <a href="...
user avatar
  • 730
-1 votes
2 answers
26 views

Regex: How to delete a a html tag from another html tag paragraph

I have this paragraph: <p class="dobe">Intră pe site-ul magazinului comandă un xerox 3D (ceea ce puteţi face şi voi intrând pe site-ul </a>  sau la numărul de telefon. Dupa ce ...
user avatar
  • 730
1 vote
2 answers
38 views

Regex: Select/Find all html tags that contain only 4 words

I have this 2 html tags. I want to find all html tags that contain only 4 words (only the first line in my example) <p class="mb-40px">My name is prince</p> <p class="mb-...
user avatar
  • 730
-1 votes
1 answer
101 views

Regex: Change to lowercase all the words that have uppercase letters from title html tag (except the first letter)

I want to use regex to change to lowercase words that have uppercase letters <title>THE CHILDREN are at home.</title> TO BECOME <title>The children are at home.</title> So, I ...
user avatar
  • 730
0 votes
1 answer
53 views

How to implement regex on a powershell find and replace to quickly change file names in windows 10?

Hi I have a set of files in a folder (windows 10) that are named something like this: asfdjlaksjfdi09908jfakl.part1.rar aabdjkhihsdjkf.part2.rar sdjklufia9798uiownlnsadkfasdFASDFrwe34342.part3.rar ... ...
user avatar
0 votes
0 answers
29 views

Use Regex in new Outlook rule

Hi is there a way to use a regex wildcard in an Outlook rule, I simply want to skip part of the subject, eg I want to detect Invoice #12345 from MyMSP Technologies in the subject but for any invoice ...
user avatar
0 votes
0 answers
12 views

Tool or Setting for WinMerge to compare two text files, but only searching for the <prefix>

I am comparing up to four files with a content similar to this: // This is a comment // // <A001> This is a String which is bound to the prefix <A002> This is another String with another ...
user avatar
0 votes
1 answer
29 views

Same regex, different outputs if you try to use tool to batch rename files using regular expressions

On notepad++ I use this Regex Find: (\d{4})|((\d+)) Replace: ((\1\2))# How it works input: Tenet 2020 Alpha.1999 beta (1997) output Tenet (2020)# Alpha.(1999)# beta (1997)# But if you try to use ...
user avatar
0 votes
0 answers
15 views

when running "LC_ALL=C.UTF-8 egrep -axv '.*'" to detect non-UTF8 characters how can I determine the exact character that caused the detection?

I frequently use this command: LC_ALL=C.UTF-8 egrep -laxv '.*' filename this tells me if the file contains any non-UTF8 characters (actually I usually use this in conjunction with find to scan many ...
user avatar
0 votes
0 answers
14 views

Regex: how to keep a numeric string but adding other characters to the left and right

I have some strings like Tenet 2020 Alpha.1999 beta (1997) I try to undestand how replace in this way Tenet (2020)# Alpha.(1999)# beta (1997)# Find: (\d{4})|(\(\d+)\) Replace: \(\1\)# This regex is ...
user avatar
0 votes
0 answers
25 views

Regex to remove text after some string or some character

I use a batch code to rename some files. I have this situation thg 2013# ajjogj ggeg 2013# gtkhj ijhhi I want to get this thg 2013 ggeg 2013 I try to set this code to remove text after 2013# for %%a ...
user avatar
0 votes
3 answers
28 views

Regex: Find the letter (diacritics) î in the middle of the words, but not the letter î at the beginning or at the end of the words

I must find the letter (diacritics) î in the middle of the words, but not the letter î at the beginning or at the end of the words. For example: 1.stăpînii 2.înstăpanit 3.coborî 4.înfornît So the ...
user avatar
  • 730
1 vote
2 answers
54 views

Regex: Select all words that doesn't start with letter "p"

I must use regex to select all words that doesn't start with letter "p". For example: book, laptop, promise So, the regex formula must select only book, laptop My formula doesn't work, don't ...
user avatar
  • 730
0 votes
1 answer
30 views

Highlight words in sentence

I have few sections of a book which contains matter of following format: Meanings 1:- Appreciate : understand value of something, situation, to be grateful. Regard:to think of somebody, best wishes. ...
user avatar
  • 29
0 votes
2 answers
38 views

REGEX: Find the html tags that contain an operator, but which do not contain other operator

1. <p class="mb-40px">My nick name is Prince and <a href="https://mywebsite.com/bla.html" class="color-gege" target="_new">my real name</a> is ...
user avatar
  • 730
1 vote
1 answer
34 views

Notepad++ Find lines that contain multiple strings in any combination?

For example, in the following list, I want to find all lines that contain onkey AND tur AND .pdf, in any combination (stings in any order, repetitions allowed, but each must be present at least once ...
user avatar
1 vote
1 answer
37 views

Extract/Replace and Convert string in Notepad++

i have a file looking like this: Line 207: ["Mystic Scroll: Shock and Swarm"] = { Line 297: ["Mystic Scroll: Concentrated Solar Beam"] = { Line 474: ["Mystic ...
user avatar
  • 13
0 votes
2 answers
34 views

Regex: Find those links that highlights only one word

I have this 2 links that highlights a word game , and the second the words, acapulco heat <a href="https://mywebsite.com/page-one.html" class="color-bebe" target="_new&...
user avatar
  • 730
0 votes
2 answers
21 views

How to batch-change same characters in notepad++ column

I some MCQ questions and I need to change the answers start from (A) answer (B) answer (C) answer (D) answer (E) answer TO A) answer B) answer C) answer D) answer E) ...
user avatar
0 votes
2 answers
146 views

Regex: How to remove empty spaces or newline character from html tags?

I have this kind of html tag, which is interrupted by space at some point after word masuri: <p class="mb-40px">Aceasta este o melodie alcatuita din patru masuri: reluata apoi de catre ...
user avatar
  • 730
0 votes
1 answer
14 views

Regex: Select only the dots that are followed by words that start with a lowercase letter

I want to use regex as to select only the dots that are followed by words that start with a lowercase letter. Example: 1: My cat is here. and I don't know where is the dog. 2: My cat is here. And I ...
user avatar
  • 730
0 votes
1 answer
41 views

Piping PCRE grep into sed

I wanna sed this file, but the BRE in sed is not working as well as I hope. What I have now is basically just : $ cat Dungeon | grep -P -o '<\/.*?>' My question is how do I sed this? I want to ...
user avatar
0 votes
0 answers
42 views

How to reverse the quotes of my Urdu sentence?

I have lots of text in Urdu language which has quotes reversed. I want to reverse them back to normal. ’’احرام باندھتے وقت کاغسل‘‘ This is what it looks like (above). I want to make it look like ...
user avatar
  • 29
1 vote
2 answers
29 views

How to add import content of a hyperlink to the title of that hyperlink with Regex?

I have this link (HTML Links - Hyperlinks) <p class="mb-40px"><a href="my-name-is-prince.html"></a></p> I want to import the content from link, copy it, ...
user avatar
  • 730
0 votes
1 answer
58 views

Notepad++ | Remove/Replace substring using RegEx

I have following sample text in Notepad++: params=id=ABC-12345|layout=1|external=true|project=12345_ABC|revision=1093180 params=id=ABC-12345|layout=1|external=true|revision=213121 params=id=ABC-12345|...
user avatar
0 votes
1 answer
16 views

Make continuous numbered list in different lines

I have some data at {1} This is a test data {2 } This is another data. Notice space after two which was given by error {3} This is one more data { 4} Another space error before number I want to make ...
user avatar
  • 29
2 votes
1 answer
36 views

Delete lines using RegEx

I have a situation mentioned below. I need the keep the sentences/lines starting with {digits} and delete rest of the lines. I tried this but not working. Find: [^({\d{1,2}}.+?\r)] Replace:$1 The list ...
user avatar
  • 29

1
2 3 4 5
39