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
1answer
71 views

In excel 2010, substitute any number corresponding to pattern with look-up value

I'm trying to figure out a way to replace/substitute/regex a specific pattern in an Excel table with the corresponding value from another table. The pattern, which appears x times inside a text block, ...
1
vote
1answer
41 views

find and replace 4 characters or columns from end of line

I have a large database with text and 4 digit numbers: wide receipt 5245 seacrest john mason field - rogue 5524 charly rose/flower - return deemed creed 7532 I want to sort them so that the ...
0
votes
1answer
33 views

tweaking a regex in Notepad++

I need to create a regex for Notepad++ for the below expression, when the text of "Letter to Mary"changes {\par\pard\qc \b Letter to Mary °\par\pard} I tried the following but it is not working ...
0
votes
1answer
40 views

regex expression for two digit numbers

I need to create a regex for Notepad++ for the below expression. However the two digit numbers (for example 24) always change. How should it be the expression? {\cf2 \super (24)} it does not work ...
1
vote
2answers
268 views

Remove/Change specific Html tags NotePad++

i have found many similar posts, but non of them answers my question. I would like to replace/remove/change open and close tag with a specific key word. in this case i am trying to remove all tags ...
5
votes
5answers
291 views

Copy file names with a certain number of characters in command line (CMD)

I need to copy all text files on one folder whose names are five characters long. I know this command is for listing: $ dir folder /B | findstr /R "^.....\.txt" but I want to copy all files whose ...
1
vote
2answers
35 views

How to select or remove everything outside of : :

I need some help with notepad++ and RegEx. I looked for some answers already, but didn't find or understood them. I basically have lines that goes like.. ...
1
vote
1answer
33 views

Generate CSV from NS Zone File

I have a large file that contains records in multilines. ex: domain1 NS ns1 domain1 NS ns2 domain1 NS ns3 domain2 NS dnsx What might be the fastest way to generate a CSV of the form ...
0
votes
1answer
72 views

Replace nth element of list with regex

I have a file with lists of strings separated by semicolons, like this one: aaaa;bbb;ccccccc;dd; eeee;fff;ggggggg;hh; iiii;jjj;kkkkkkk;ll; and am looking for a regex expression to replace the ...
0
votes
1answer
101 views

Regexp engine misbehaves in Atom

I'm trying to remove all lines starting with whitespace characters from a big text file using Atom. The regular expression I use is ^[\s]+.*$. The problem is, it selects not only lines starting with ...
7
votes
1answer
160 views

How can I search and replace a variable in Linux?

I have a bunch of files with lots of rows configured like this: what,r-crq,What,What,VAC5700-035080,What i,pns11,I,I,VAC5700-035090,I do,vdd,did,did,VAC5700-035100,did I want to do a search and ...
1
vote
1answer
58 views

Using regex in BASH script to grab filename/type recently created as output by command earlier in the sequence

I recently asked This question about the use of gpaste getoutput as STDIN for youtube-dl. That question has since then been answered, but I would like to move on to the next step of automation a ...
0
votes
1answer
30 views

text editor-style renaming of filenames in directory

How can I edit the names of files in a directory as though I were editing the text of a file using a text editor? I feel like I've seen this demoed in a video, perhaps using some Vim plugin or ...
0
votes
0answers
22 views

How to use TextMate 2's Find “In” Regular Expressions?

Ok, here is a scenario, in pictures. OK, so searching all files looks in 333 files, and finds 614 matches. First result is alex/init.zsh. Fine. So I try to limit the scope a bit, with my logical ...
0
votes
1answer
172 views

Extracting lines from a large text file which follows a pattern

How do i extract lines from a text file which satisfy this regex ^2. I am using linux. I know grep is able to extract the number of lines but i would need them to be output to a text file. Is it ...
1
vote
2answers
155 views

Use Sublime Text find to highlight a regex group in search pattern

Is there a way to make Sublime Text highlight (match) only part of a regex search pattern? For example, I want to exclusively highlight Text when searching for Some(Text).
0
votes
0answers
37 views

Outlook Query to highlight messages that mention me?

In essence, I want to do some conditional formatting on messages that mention me. Below are 3 sample Messages (Bodies). The first two should be purple, the last one should not be purple because I ...
0
votes
1answer
72 views

Printing matching subgroups in a perl one liner

I have the regex[1] (/foo/bar/(GW|GREV)[^/]*).* I was able to get this to work with GNU sed with sed -n 's/\(\/foo\/bar\/\(GW\|GREV\)[^\/]*\).*/\1/p' But that was a modern GNU sed and I'm on ...
1
vote
1answer
481 views

Replace variable in string with Regex in Notepad++

I'm new to Regex and Notepad++ need to remove variables from code. For example, remove everything between the double quotes in lines like this: alt=""Frontline Plus for Dogs and Cats"" To leave me ...
1
vote
1answer
90 views

How to find the missing number in a sequence

I have a Holy Bible file which starts every line with a verse number (e.g. 1, 2, 3, 4) and so on. But on certain chapters some verses are skipped or are not present, for example 10, 11, 12, 14, etc. ...
0
votes
0answers
32 views

insert text and numbers in notepad++

I have this: ...something...data-src="TEXT"...something...src="images/BBP/BBP0001/01SMALL.jpg"...something... ...
0
votes
1answer
82 views

Transform a CSV with Notepad++

Suppose I have a CSV file like this: 1,"abc",,,, 2,"def",,,"ghi", 3,,"jkl",,,"mno" Now I need to transform it in 3 steps: Replace all empty spaces with the String NULL Add at the beginning of ...
0
votes
0answers
37 views

Find and Replace in .txt file by extracting data from spreadsheet

I need to replace instances like Manhole Name="1" with Manhole Name="SW3/001" for instance by extracting the data from spreadsheet. Would that be possible using regex, or in any possible way ? ...
3
votes
2answers
397 views

Find and replace multiple times in txt file

I know this might have been asked before, but I could not find an answer to it. I need to replace the following: CoverLevel="XX" with CoverLevel="0" , this includes XX being any number, without ...
3
votes
2answers
71 views

Word 2010 wildcard search - Find text in format ABC.DEF.XYZ

I am trying to find text in Word 2010 in the following format: ABC.DEF.XYZ. This is essentially finding code references, using Java syntax, written into the word document. Please note that a ...
0
votes
0answers
52 views

Regular Expression to match a dot followed by a space inside a tag

I must be missing something quite obvious, but I need to match every dot followed by a space ". " inside these tags: <example:label xml:lang="en">One. Two. Three. Four</example:label> ...
0
votes
1answer
71 views

What is the regular expression in Notepad++ which matches 1 to 8 character words?

I have a very big text file. Every line in this textfile has a one word in it. How do I search for words which are 1 to 8 characters long? [A-Za-z]{1,7} doesn't work.
1
vote
2answers
338 views

Match multi-line pattern in Charles proxy rewrite rule

In Charles proxy, I'm trying to use a rewrite rule to match a pattern that spans three lines in a response body, using \s* in the Match value (with 'Regex' checked) to match new lines. It appears ...
2
votes
1answer
266 views

unknown exception error when I run Notepad++ v6.8.2 when starting Regex Helper

I get an unknown exception error in Notepad++ v6.8.2 when starting Regex Helper? Any suggestions? OS: Win7 64-bit Installed with installer package
0
votes
2answers
63 views

awk and regex with {}

I want to print whole record if it contain word and some character, which are optional. Script: /mount[ein]{0,2}/{ print $0} Unfortunately it doesn't work. Without "{" and "}" it work. I tried with ...
0
votes
1answer
19 views

Remove all lines after /

I have 2 lists one with this format: http://www.example.com/archives/573 http://www.example.com/1812.html http://example.com/hello-world/ but i want it in this format www.example.com ...
0
votes
0answers
25 views

mutt regex for limit filters

Does mutt support multi-line regex for its search filters? I cannot find an yes or no in the documentation. I'm assuming its not supported, but cannot tell if maybe I am improperly escaping my regex. ...
1
vote
1answer
19 views

Vim: Columising a long line of arrays

In writing tests I often want to compare a generated value to something I've previously generated, but dumping the output from my console into vim leads to a very long ugly line. Is there any way to ...
1
vote
1answer
28 views

How to remove pattern containing blank space and special characters in sed

How to remove following words from a text file: DEFAULT ('') DEFAULT ((0)) DEFAULT (((1)/(1))/(1900)) DEFAULT (getdate()) I am not able to delete above four pattens using sed.
0
votes
1answer
42 views

VLOOKUP returning N/A because references contain “.” and “ ” in one table, not in other

OK I am trying to vlookup a table but the problem is the references on one table are slightly different to the references on the other table. I can get the VLOOKUP function working, but it is ...
1
vote
1answer
24 views

Replace a line with a specified pattern

As shown in the example, the number 1 appears in the same column in every line, and in my file, there are 6000 lines like that in total. 1. 1 2. 1 3. 1 4. 1 5. 1 6. 1 7. 1 8. 1 9. 1 I want to ...
1
vote
1answer
68 views

Notepad++ find and replace string or text with new string or text

I have some code several hundred lines long and I want to find each "String" and replace it with a different "String". Example below... $BR360Button.Add_Click({BR360Button}) ...
0
votes
1answer
31 views

How to remove lines not ending in a number?

How do I null or better yet, remove, the lines in a file that do not end in a number [0-9]? I'm using gvim blahblahblah delete this line foobarbizzbuzz keep this line because it ends in 9999113 ...
-1
votes
1answer
97 views

replace/rename directory name using regex

i have multiple folder with this pattern "720p.MP4-ABC[abcde]" trying to replace or rename "720p.MP4-CAB[aedcb]" to "."
1
vote
0answers
46 views

MS Word, can we write a multilingual regular expression?

I want to find all the occurrences of the from x.y and change it to x,y where x and y are numbers: I was using this: ([0-9]).([0-9) and doing the replace using \1,\2 but here is the catch , if the ...
0
votes
0answers
33 views

HTTPD 2.2.15 AliasMatch

I have built a regex for an AliasMatch that tests out fine against the PCRE tester at regex101.com. The task I am trying to accomplish it to allow any alias matching a pattern to refer to a common ...
0
votes
1answer
20 views

Quotes in sed when used in bash script

I am generating sed expression in Bash script, and I am having a following problem. I want to add a space in front of each appearance of abc. This commands works as expected echo abc | sed -e ...
3
votes
2answers
2k views

Replace every nth instance of a character with a new line in Notepad++

I have a pipe delimited string of NAME|VALUE pairs looking something like this.. Name1|Value1|Name2|Value2|Name3|Value3 What I want to do is to replace every second instance of | with a new line so ...
1
vote
0answers
89 views

Search & replace speed in Notepad++ / indexing

I am using Notepad++ to search and replace in around 60, 000 files, one folder. It only seems to be processing around 2 files per second, is there any way to speed this up? I have an i7 processor ...
0
votes
1answer
37 views

Excel search character range

Is it possible to use character classes ([A-C] or [abc]) instead of wildcards in the SEARCH function of excel? I want to do something like the following: =SEARCH("[AB]"; A1) This should result in ...
2
votes
1answer
99 views

Notepad++ regex find/replace adjacent ids

I have a csv file that looks like this: ID, term, functional category GO:0008166,viral replication,P, GO:0008167,sigma virus replication,P, GO:0008168,GO:0004480,methyltransferase activity,F, ...
0
votes
0answers
84 views

How expand NSDataDetector's NSTextCheckingType and corresponding pattern?

I want detect some condition more than NSDataDetector's internal types, so need know whether IOS system already provide a interface for expand NSTextCheckingResult. apple document just say: the ...
0
votes
1answer
131 views

regex to match everything but substrings beginning with hashkey

I am building a regex to filter out any substrings beginning with '#' or '@'. I am trying to filter tweets from those. Currently it matches everything no matter if the string contains words beginning ...
2
votes
2answers
42 views

Delete everything in second column not in parentheses

I have a file that looks like this: gene ID protein Solyc06g062540 (Z) PYROPHOSPHATASE 3 (PTHR20889:SF0) Solyc10g075050 ALBUMIN SUPERFAMILY (PTHR33076:SF11) Solyc07g061760 ...
1
vote
1answer
84 views

Abobe Brackets how to find in a folder

In the official web: https://github.com/adobe/brackets/wiki/How-to-Use-Brackets Under the title: 'Instant Find in Files' they say: "You could even make the search in a specific folder" Can anyone ...