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

learn more… | top users | synonyms (1)

0
votes
0answers
22 views

Dreamweaver REGEX trying to find and replace (or remove)

So far am using this: "http([^>]+) as my REGEX. The page has multiple urls mixed with text and DOM Elements. Something like: <li><a href="http://www.uen.org/toolbox">UEN's Teacher ...
2
votes
1answer
58 views

How To find a word and replace with changing pattern

I have a text like the following: case "UID": if (!Convert.IsDBNull(objDataReader["XYZ"])) { objQualitativeAssessmentBiz.XYZ = objDataReader["XYZ"].ToString(); } break; case "GeneratedChaseId": ...
-1
votes
1answer
44 views

Notepad ++ - How can I replace a line using a column from next line

So the problem is that, I have a really huge file of clients and I need to do this: example1.1@hotmail.com example1@hotmail.com;12345 Became this: example1.1@hotmail.com;12345 ...
1
vote
1answer
77 views

exclude specific strings of words using wildcards

I cannot seem to come up with the appropriate wildcard (I suppose it must be [!]) which would exclude from the expression argument[oales]{1,4} the following three words argumentos argumenta ...
0
votes
2answers
119 views

Notepad++ - replace every first space of a line

I know there are a lot of these types of questions but I can not find a way to alter one of the existing solutions for my problem. My text file looks like this: word<tab>word<space>...
0
votes
0answers
39 views

Replace using Regex in Notepad++

I want to replace every occurrence between <fb:like href= and </fb:like> in notepad++. I know I can do this with Regex, but i tried for a couple of hours in vain. I have to do this in a ...
0
votes
1answer
29 views

Regular Expressions: Assertions

I would like to know what the definition for an assertion is in the context of regular expressions. If anyone should know, please enlighten me with a brief definition of what it actually is. I would ...
0
votes
2answers
35 views

Notepad ++ find and replace issue

I have had some luck with notepad ++ solving some complex find and replace a lot of similar text in around 8000 documents, but not this particular one: In a text file I will have a lot of lines that ...
0
votes
1answer
31 views

How to add quotes to a datestring notepad++ regex

I have a huge text files with date strings in the first column. For further processing, I need to have the date strings in double quotation marks: 2015-11-11 00:00:00.00,59,... Should end up like ...
2
votes
1answer
158 views

How to delete all files that don't have a certain string in their name

I have seen Deleting all files that do not match a certain pattern - Windows command line However, I have not seen anything regarding how to delete everything that does not contain a certain string ...
0
votes
0answers
21 views

Regex search and replace on a webpage

I am proofreading plain OCR generated text on webpages, cleaning up typos (scanos) which I search for and replace using Regex strings. My problem is with the ">" and" "<" characters. How would I ...
0
votes
2answers
58 views

Extract One letter and three numbers from .txt files using Notepad++

I would like to extract from many .txt files a certain data in Notepad++. It has a lot of data in one file, but I only need specific... This is what looks like in a file: ©Q Ńü Vý 8 ź) €...
0
votes
1answer
16 views

Why sed regexp digit character class includes CR character if the last digit is at the end of the line?

I wanted to extract the Content-Length's size from an URL and output the URL + $size on the same line. The data I worked with: > curl -I -s http://yahoo.com HTTP/1.1 301 Redirect Date: Thu, 10 ...
0
votes
0answers
22 views

notepad++ continuing a line from

I have a file with many lines aaaa bbbn* ff fdsfdsf I want to have that but using the extended replacement like \n aaaa,bbbn*,ff,fdsfdsf I looked the internet for a list of these escape ...
0
votes
1answer
25 views

How do I replace the text I searched and that is now highlighted?

I want to replace the " by ' in all the text that are found with regular expression (\w)"(\w). For instance : s"t should become s't. I run the regular expression with the Mark tab, so now all the ...
0
votes
1answer
26 views

Using 'diff' compare usernames from file1 to file2 containing emails

I am trying to identify active accounts over dead accounts and was wondering if diff along with grep or sed or regex can be used, instead of writing a long program. File1 (usernames) ...
1
vote
1answer
19 views

How to replace based on regex in Notepad++

I have json array like that: [ { "id": 2, "title": "Mr", "name": "Harry Robinson", "company": "ResearchBch", "email": "anything", "age": 38, ...
2
votes
1answer
82 views

SublimeText Markdown Extended add Roman Number Highlighting

In this question, I've inquired about how to highlight more than one markdown list punctuation item. I now want to extend the highlighting to roman numbers as well, because those are supported by ...
0
votes
2answers
50 views

Regular expression to select only the line that contain two searched words?

I am not very advanced with regular expression so i am not sure how to do this. Let say i have a text file that contain more then 1000 lines of data. I want to search for the words 'command' and 'find'...
0
votes
1answer
80 views

How can I search for text files that do NOT contain a word?

I need to be able to search a directory for all files that do not contain a certain word. My issue with my approaches so far is that they return every line of every file that does not contain the word....
0
votes
0answers
35 views

Selecting a group in a pattern on ZSH Glob

How can I select a group in a ZSH pattern to be used later in a substitution or a reference? Example: print the files matching a given pattern and followed by a substring of that name selected from ...
1
vote
2answers
59 views

Remove everything from text except what is in brackets with Regex

I would like to use notepad++ to remove everything in a text file except anything found between [ ]. Example: [D-1.1.1-A] - bla bla text here[D-1.1.1-B] - some more bla bla text here[D-1.1.1-C] - ...
0
votes
0answers
22 views

vim regex pattern freezes search?

I need this pattern to find any () and anything inside, whether it be one word or a paragraph over multiple lines. but when the pattern hits the bottom if freezes? I have never encountered this before,...
0
votes
0answers
33 views

Why isn't find excluding files with the given regex?

I'm trying to find all files under /mnt/Storage not under /mnt/Storage/.Snapshots. The following works: find /mnt/Storage | egrep -v "^/mnt/Storage/\.Snapshots" But the following does not: find /...
0
votes
1answer
36 views

Selecting all words inside curly brackets to paste into a new file with Notepad++

I have a dictionary document that uses the following syntax: \lem{WORD}{POS}{PL}{DEFINITION} \lem{WORD}{POS}{PL}{DEFINITION} \lem{WORD}{POS}{PL}{DEFINITION} and etc.. I want to select every WORD ...
0
votes
0answers
27 views

regex to match child mount points

I am writing bash script for checking that "child mounts" doesn't exits before "parent mounts" on fstab i.e: if I have the following mounts on fstab: good fstab mount point example first /...
1
vote
1answer
43 views

Multiline Search and Replace in Linux

Tried this with vim, but open to other ideas/suggestions. Would like to perform a search and replace in a file with 12000 lines. Specifically, if an occurrence of "^ SetFontSize 28" exists ...
1
vote
1answer
66 views

Using shell (bash) to determine key for value from file

I am scripting some application deployment and deploy promotion processes using bash (shell). These scripts are being written as a failsafe in case our CI platform ever fails again (as it has recently)...
1
vote
1answer
124 views

How to download files matching a particular pattern from ftp command line

I am accessing ftp through command line and trying to delete all the files matching particular pattern. But seems it does literal match than regex match. Can somebody suggest anyway that we can do ...
0
votes
1answer
67 views

Change color of row according to column value (by regex)

I'm quite new to excel so this could be dumb question. I need to change color for those rows which has suffix .com in their second column. I use OpenOffice but I can change it using Microsoft Excel ...
2
votes
1answer
61 views

Remove spaces at beginning of line if first non-space character is a letter (Notepad++)

I am using Notepad++ to cleanup some wiki code and would like to do the following: I need to remove all leading spaces from a line but only if the first non-space character is a letter. Here's an ...
0
votes
1answer
102 views

Regular Expression - Where string contains 'bar' but is not preceded by 'foo'

I currently have a regular expression to match where a string contains 'bar' but is not preceded by 'foo': (?<!foo)bar I wish to modify the regex to match where a string contains 'bar' but is ...
0
votes
1answer
47 views

How to match a word followed by anything in Notepad++

I want to enclose the first word with brackets and the "anything" that follows after the space by brackets too. Unfortunately the command : (\w) (.*) doesn't work. For example, for the sentence "How ...
1
vote
3answers
116 views

Notepad++ Regex to replace the 4th character of each line in a text file.

I have a large text file and want to replace the 4th character of each line. Cloud you please suggest a Regex to do that in Notepad++?
2
votes
1answer
34 views

sed, regex replace with vars

I'm trying to use sed (4.2.2-4+b1 debian 8 (jessie)) to replace text in multiple files. To go from this: $var1 = array(foo=>"bar",bar=>"foo"); $var2 = array( foo=>"bar", bar=>"foo" ); $...
1
vote
1answer
42 views

Replace returns wrong capturing group

I have a text file that looks something like this: ,'','a','bc','def','ghi','lmn','op','qr','stu' I'm trying to replace groups of 5 with the match and a line break for easy readability. So, I'm ...
2
votes
1answer
227 views

Remove trailing whitespace at the end of table cells

I have opened a PDF file in Word in order to edit it (the original Word document is lost). During the conversion, each line of text and each table cell was given an extra space. Of course, they don't ...
0
votes
1answer
22 views

How to extract only a part of a string

I have a batch file using wget and grep that downloads a website, and then extracts the fallowing string from the source code. <p>11.59 €</p> As you can see, grep included the paragraph ...
1
vote
1answer
40 views

Assistance with RegEx in Word

I have a Word 2010 document containing a list of blocks with predifined styles. The styles are used in another software to process these blocks. I created the document using a wrong quickpart so all ...
0
votes
0answers
8 views

Is there any way to keep “Regular Expressions” checked by default in TextMate?

When I use the find/replace dialogue in TextMate2, 95% of the time I want the regular expression behavior. However, every time I restart TextMate, it defaults back to leaving it unchecked. It also ...
0
votes
3answers
26 views

Use of the “OR” Regex operator with the find command

There are so many of these questions on the net, but I was unable to solve this simple problem. I have a directory with a lot of images, but I only want to copy a subset of them identified by ranges ...
0
votes
1answer
22 views

Regex directory renaming

I'm not great with regex and can't figure out why this is selecting the next character after the - /[\-][^ - ]/g with that, it selects - and the following character. I want to select the dash ...
0
votes
0answers
17 views

Can Spamassassin be made to advise match details in description

I have a number of Spamassassin rules which use simple regex. Normally this regex is matching something like /(opt1|opt2|opt3)/i When a rule matches, is there a way I can include the matched code ...
0
votes
1answer
47 views

Notepad++ or Vim Document Wrap or Text File Wrap

This is going to sound weird, bear with me. I am not looking for the regular word wrap, which I already know how to toggle. Is there any possibility to do a "document wrap" or "text wrap" in Notepad++...
0
votes
0answers
45 views

Searching for a string with grep

I'm looking for a way to retrieve a dollar amount from a website using a combination of wget and grep. This is what I've got so far: wget http://csgobackpack.net/?nick=jotnova -q -O - | grep -o "[...
1
vote
1answer
32 views

Notepad++ grouping/capture not working

A regular expression such as "(Received):" should match every "Received" that precedes a ":". N++ is finding for me the whole string: "Received:" So instead of highlighting in my document "Received" ...
0
votes
1answer
17 views

How to unhighlight 1st special caracter if any

(?:[^.]|^)((?:\b(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|0?[0-9]?[0-9])\.){3}(?:\b(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|0?[0-9]?[0-9]))\b(?=[^.:/]|$)) this highlights correct IPv4 address, but if at front there ...
0
votes
1answer
35 views

I want a for loop to go through files with two diffrent extensions

I want the following loop to go through m4a files AND webm files. At the moment I use two diffrent loops, the other one just replaces all the m4a from this loop. Also the files that ffmpeg outputs ...
0
votes
1answer
71 views

Perl replace string inside file with the filename?

I need to replace a string in a JSON file with the filename of that file. I successfully matched the string to be replaced using the regex below, but I can't figure out how to get the filename in ...
1
vote
1answer
27 views

How can I display all mail from one specific author in Mutt?

I would like to display a search in mutt; i.e. all mails send by a specific author in inbox. ~f author displays only the first mail from "author" surrounded by different mails. And I cannot ...