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
6 views

Regular expression for find in files in Textpad

I want to use regular expression for find in files in TextPad. I need to find URLs starting with "Areas/" and ending with "/pdf"(something like this Areas/../../...pdf). Please suggest me the correct ...
1
vote
2answers
36 views

Notepad++ Regular Expression Assistance

I am currently trying to find \000\000\001\031704_news_release.pdf Which I have successfully done with 000\\000\\\d\d\d\\ I am pretty sure I am doing something wrong here though because I want ...
0
votes
0answers
7 views

FatRat - How to add FTP credentials?

I am wondering, how to add FTP credentials to FatRat? You have to insert an regular expression, but how exactly does it have to look like? Anyone has an example of an regular expression? For example ...
1
vote
1answer
18 views

Remove everything before the colon character (regex) in ms word

I need a regex to remove everything before the : character. An example would be: UNIDENTIFIED MALE #1: Thank you. Roll camera. Do you have numbers moving out at the sound? UNIDENTIFIED MALE ...
1
vote
1answer
14 views

Regex Expression in Notepad ++ (Replacing value)

I'm trying to replace a statement that has this pattern: readonly="if(xxxx.x_DATE lt yyyy.y_yyyyy,True,False)" where "DATE" in the statement are dynamic (vary in the file, i.e. 0101, 0102, 0103 etc) ...
0
votes
1answer
8 views

How to exclude certain paths in Hudson using regular expression

We use Hudson and like to exclude certain paths from the code checkout source using regular expression. Paths to exclude: src/abc/def/efg/z.h src/abc/def/m.h src/abc/def/efg/kvt/y.h We tried but ...
0
votes
2answers
28 views

Notepad++ comment all lines containing string or all bookmarked lines

I wanted to comment out some java code using Notepad++ e.g. StringBuffer sbTest = new StringBuffer(); sbTest.append("aaa"); sbTest.append("bbb"); sbTest.append("ccc"); sbTest.append("aaa"); ...
1
vote
2answers
34 views

Regular expression to match cell boundaries

Is there a regular expression solution in Microsoft Word to match cell boundaries? Recently I had a table with several cells starting with a space and I had to remove them, unfortunately ^ to match ...
0
votes
1answer
25 views

how to delete the line after a special number?

How I can delete the numbers and characters more than a special number by regex in notepad++? This is a part of text: 1230 مهندسی برق-تبریز 126 مهندسی کامپیوتر-شریف 234 مهندسی کامپیوتر-تهران 786 ...
0
votes
0answers
16 views

Combine two and more regex, not returning variables from 2nd, 3rd regex

Still having problems with this. Trying to replace all text in a file so it just returns certain variables. It's a large file in Notepad++ ^.+?2014(.+?)Heading1Name(.+?)">(.+?)<(.+?>.*$ ...
0
votes
0answers
30 views

Delete lines containing string using Notepad++ [duplicate]

I would like to delete all lines in multiple HTML files containing the following strings: api.addthis.com <!-- span class="invisible">Bookmark Thanks for the help!
0
votes
1answer
33 views

Delete all code inside a tag in multiple HTML files with Notepad++

I need to delete all code contained within <li class="share"> ... </li> including the <li> tags themselves. There are multiple other <li> tags inside the li class="share" ...
0
votes
2answers
18 views

Find files to find multiple instances of the same code with Notepad++

I might have inserted <meta charset="UTF-8"> twice in some HTML files, and there are too many of them to check manually. Is there a regular expression I can use with Notepad++ to search for ...
0
votes
1answer
56 views

Regex for “Delete everything going forward but only up until start of [Expression]” [duplicate]

I am in Notepad++. I have the following data embedded in a large html file. I want to get the variables before the </ix:nonNumeric> at the end of the lines, onto their own lines by themselves so ...
0
votes
1answer
17 views

expr bash command returning 0 in substring evaluation

What I'm trying to do is read a line from a file, store it in a variable $line and extract all instances of (that is, angle brackets with only uppercase letters between them). What I'm trying is: ...
0
votes
0answers
14 views

Sublime Text: Why regex in syntax highlighting does not work?

In sublime text 3 a default syntax highlighting rule paints a sql select just fine if its in the same line, but not if its in the next line: vs After reading this question I opened the PHP package ...
0
votes
1answer
71 views

Notepad++ Deleting everything apart from 40 variables, putting them on their own line, combining regex

I am in Notepad++. I have the following data embedded in a large html file. I want to get the variables before the </ix:nonNumeric> at the end of the lines, onto their own lines by themselves so ...
0
votes
1answer
35 views

Notepad++ delete everything in entire large file before and after a variable

I have large text files with all kinds of characters, symbols and numbers. Can I use notepad++ to batch work through a directory of these and delete everything before and after a variable? I need to ...
2
votes
1answer
48 views

Notepad++ - Delete Everything Other Than The Specified Strings

I have the following strings that I want to keep and delete the rests: uicomp-type="example-string" uicomp-type='string-example' I use the following regex to find those strings: ...
0
votes
1answer
34 views

Find all instances of a string where the line doesn't begin with a comment character?

I'm doing a Find in Files for a few strings; "V1.10", "V1.01A", "V1.2" I'd like to find all instances of those values (fine if I have to run 3 different searches) except for lines that start with ' ...
2
votes
1answer
27 views

Match first next word matching a given pattern using sed

I'm having trouble getting the following behaviour: input='somestring... --key1 val1 --key2 val2 --key3 val3 somestring...' output='val1' I tried using: echo $input | sed -nE 's/.*--key1 (.*) ...
0
votes
2answers
47 views

Regex remove line contain character

I have a list of values being returned to me and they all end with a | like below: testdata1-old | testdata | test2-old| I want to delete all the lines containing -old. What regex can I use?
0
votes
1answer
43 views

Replace highlighting characters with something else

I wish to replace color codes with something else. For example, running cal command i want to get some html tags instead of color codes: July 2015 Su Mo Tu We Th Fr Sa 1 2 ...
0
votes
2answers
27 views

Basic regex match up to first period [duplicate]

I am trying to match a search term up to a first period using grep So for example, grep-ing through foobar searchterm. hello world. should print foobar search term blah. I save the above to a ...
1
vote
2answers
36 views

Matching a sentence with grep

I'm trying to grep for the full sentence containing a search term. I've tried grep (^.|\.\s).*searchterm.*(\.\s|\n) but it's not working and I'm not sure why. To clarify: I want stdout to print ...
2
votes
1answer
26 views

Notepad++ Regex find line pattern but only replace one line

I am new to regex. I want to modify lines in a text file based on a particular pattern. I was able to write an expression to find the pattern but in the group of line that it returns I want to only ...
0
votes
0answers
12 views

Replace numbered paragraphs from one document to another?

I have two documents that are identical, but one is in English, the other in Spanish. I took the first and took care of reformatting it by hand, mostly. Now, rather than going through the lengthy ...
0
votes
1answer
13 views

Vimperator — Custom ExtendedHit to launch script/program on matching regex

I want to define a custom extendedhint in vimperator that: Matches a regex pattern Feeds that match to a script as such: ~/bin/script regex-match-as-arg Where should I start solving this problem? ...
0
votes
0answers
23 views

regex search compressed password protected files

I have a repository of a few million large text files. I need to regex search them on a regular basis. Because they are large, I use gzip to compress them and zgrep to search them. I have been asked ...
0
votes
0answers
26 views

nginx regexp rule to block all urls containing a '.js?foo'?

I'd like nginx to deny all requests to static files followed by ?foo, like /path/to/somestatic.js?foo or /another/path/to/my.css?bar This is a trick that application layer ddos attacks seems to use ...
0
votes
1answer
27 views

How to add regex aliases in Postfix when using MySQL

I need to create regex based catchall aliases in Postfix setup with MySQL. I have found examples of a mysql_virtual_alias_maps_regexp.cf with this query: query = SELECT goto FROM alias WHERE '%s' ...
0
votes
3answers
54 views

Unix grep finding file beginning with [pattern]

I would like to find files that begin with a particular pattern i.e. the first line of file should contain the pattern, and then print the first 10 lines of such file, is there a way to do that? Is ...
1
vote
1answer
25 views

zsh regex failing, bug or user error?

This regex works (stripping out -search) [~%]for i in foo*-search-aae-status ; do echo $i(:s/-search//) ; done foo1-aae-status foo2-aae-status foo3-aae-status foo4-aae-status foo5-aae-status But ...
0
votes
0answers
14 views

Moving line with regex notepad ++ [duplicate]

I want to move line down to up with regex notepad ++ or batch script windows example : Video.asp?ZoneID=791 Video.asp?ZoneID=792 Video.asp?ZoneID=793 Video.asp?ZoneID=794 Video.asp?ZoneID=795 ...
1
vote
1answer
22 views

Failed to remove extra spaces using wildcards in MS Word

I have multiple instances of [word]- [word] in a text, e.g. self- interest instead of self-interest, which is the correct form. I am trying to remove the extraneous space after the stroke using MS ...
0
votes
0answers
31 views

Find and replace by a single dot several series of two dots attached to the end of words

I want to replace every series of two dots in a document by a single dot, excluding the cases where there are three dots in a row, i.e., the written ellipsis (...). Yet, the series of two dots always ...
-1
votes
2answers
46 views

Find and replace {0,} occurrences in Word

Are there any alternatives to the concept {0,} which is not allowed in MS Word? For example, if I wanted to replace, by a single abbreviation, the next five terms: articul articulo articula ...
0
votes
2answers
33 views

search and replace in VI

I need to convert '12.22.54' to '12:22:54' in a string below so that it works in MS SQL. cast('14-JAN-14 06.65.22 AM' as datetime),'63.124.79.253'); cast('14-JAN-14 12.22.36 AM' as ...
0
votes
1answer
49 views

Using ' (' (space followed by parenthesis) as field separator in awk

In an awk script I am trying to use ' (' as the field separator. However unless I escape the bracket with double back-slash, like this: BEGIN {FS=" \\("} it does not work. If I use FS=" \(" I get ...
0
votes
0answers
30 views

Adobe Brackets: How to find and replace using Regex?

I have installed the latest version of adobe brackets on my Dell laptop. Before this I was using notepad++ and there are many features in notepad++ that I'm trying to load in brackets via extenaions ...
2
votes
2answers
50 views

Rename files based on folder name

I have lots of index.html files in unique named folders (one per folder). I wish to rename each file with that of it's parent folder name. From: /folder1/index.html /folder2/index.html ...
0
votes
1answer
24 views

Regex excluding [about:] pages in firefox

I'm trying to get stylish style sheet to be deactivated on about: pages. I believe the regular expression below should be able to do just that, but firefox seems to be of a different opinion. Could ...
-1
votes
2answers
53 views

Delete text before “=” sign in Notepad++

How to delete a text before "=" in notepad ++. Example 'abc = def' '123 = 456' Output Should be 'def' '456' Thanks
0
votes
1answer
21 views

How to specify a replacement string with a newline in it?

I am using Source Insight. I am trying to replace the string Tmem::Set with the following string that includes a newline in it. //here memset I set the replacement string to be the regex [//here ...
0
votes
1answer
26 views

Line Manipulation Reformat text Notepad++ or PSPaD

I have about 40,000 lines I need to look like first line - no paragraph marks. The trouble is, I can't use join lines then use (\d\D+)& $1\n to get like line 1 because of numbers inside of ...
0
votes
1answer
37 views

Matching () with a Unix/Linux regex

I have a couple files with the name (a).1 (a).2 ... (a).100 Since a lot of processing tools don't really like ( and ) in the filename I thought it best to rename them to a different name. I googled ...
0
votes
0answers
47 views

Notepad++ extract links from html tag with class

I have a text which consists of different html elements and links like this one: <a href="somelink" class="details btn secondary large">. I want to extract links from a href tag. What are ...
2
votes
2answers
52 views

Treat part of a Regex expression as non-special characters

Let's say I've got a regex expression utilizing some of the special chars, but also a portion with 'normal' text that just happens to have some symbols in. Let's also say I'm too lazy to start ...
1
vote
2answers
81 views

Best way to increment numbers in one line in Linux [closed]

I have one line with lot of entries among which is also time. ('DEFAULT',17,NULL,'2014-07-14 10:30:00','Something','2014-07-14 06:30:00',1),('DEFAULT',26,NULL,'2014-07-14 ...
2
votes
2answers
40 views

Regex in LibreOffice Writer - finding “everything” but one thing

I have a text (html code) and need to find <p> tags with their classes, id, styles (if any) etc. I'm doing this using the following regexs: <p(.*?)> or (<p([^>]+))> The pattern ...