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)

2
votes
3answers
3k views

Extract/delete all other text than whats inside “ ”, and after string

I'm have a very big data output in a .txt file that looks like this: value1="1",value2="2",value3="test3",value4="4" value1="1",value2="2",value3="anothertest3",value4="4" ...
0
votes
3answers
36 views

How to switch and merge text lines in Notepad++

I'm using Notapad++ and I have 2 situations here that I'm stuck with, regarding large text files that have lists of verb conjugation for my students, to use with a database of an android app. ...
0
votes
1answer
29 views

Linux find files in subdirectories by extension (.txz) then move them to specified directory using regular expressions

I have mirrored a directory from a server with a large number of sub directories, each of which contain a .txz package and the usual .txt and descriptor files. What I would like to do is the ...
0
votes
1answer
32 views

is there a way i can either insert a character into a line or substitute and arbitrary character with itself plus some other carachter(s) in sed?

like say i have a string of numbers that constitute a phone number and are like so ########## and i want to format them like : ###-###-#### insert only puts in new lines, and i dont know how to ...
0
votes
1answer
41 views

Adding syntax highlighting for a comment section in Emacs

I have the following (defun add-c-syntax-highlighting () (font-lock-add-keywords nil '( ("\\<\\(\\-+\\)" 1 font-lock-warning-face prepend) ("\\<\\(FIXME\\):" 1 ...
2
votes
2answers
88 views

Performing a regex replace on a 900 MB logfile

My beloved TextPad says "out of memory" after a while when trying to perform this operation. Next best (i.e. simplest/fastest) free tool to do this?
1
vote
1answer
22 views

What is the difference between regular and literal expressions in FINDSTR?

What is the difference between /R and /C? FINDSTR [options] [/F:file] [/C:string] [/G:file] [/D:DirList] [/A:color] [/OFF[LINE]] [string(s)] [pathname(s)] /C:string Use string as a literal ...
-3
votes
1answer
1k views

Use regular expression to look for “%” [closed]

I'm programming in Java and I want to use regex to look for any data with a percent sign, e.g. 10%, 20%,30%,etc. I've tried a.matches("%")but that only returns true if the string matches exactly the ...
1
vote
2answers
43 views

Notepad++ : How to remove second occurrence of comma

I have text lines in Notepad++ like below: 1122, String1, String2, 20202 2222, String3, String4, 21212 3333, String5, String6, 3333333 4444, String8, String7, 44we23 I need to just remove second ...
0
votes
2answers
54 views

Is there a way to use Regex( or comparable solution) in Excel formulas?

I have a spreadshet that requires me to do some matching,namely speaking its a list of bonds, their tickers(names) and some data about them. I want to match their tickers(names), I know how would ...
2
votes
1answer
50 views

Notepad++ how to copy the text (only) which matches the regex expression (not the whole line)

I am looking for a simple way to copy into the clipboard all the "marks" in notepad++. I found that I could copy the whole line that match the regex using the bookmark option. But I'm looking for a ...
1
vote
2answers
52 views

How can I replace around a wildcard in a regex search?

I'm trying to comment out all of the variable type declarations in a script I have, but I've run into this problem a few other times. I'd like to match a string, followed by a variable name, followed ...
0
votes
1answer
27 views

Notepad++ RegEx replace XML file

I have looked around a lot on here but cannot find a solution to my problem and an a noob when using RegEx's. I am trying to change a XML file with tags that look like this: <key>Date ...
1
vote
4answers
60 views

Select all matching text in Vim?

I have a bunch of data, and I want to yank everything that matches the following regex to a register : /'user': '[a-Z]*' Is there any way to copy all the matches to a register in vanilla vim? I've ...
0
votes
2answers
1k views

Adobe Brackets; How to use the replace regexp function?

I searched the Brackets user guide @github and couldn't find how can I use the the search and replace function inside of the program. A simple example is to find foo and replace it with bar in a ...
4
votes
2answers
9k views

regex replace with textpad

I need to update a dateformat in a large file I have in textpad. the dateformat is currently mm-dd-yyyy and I need to make it mm/dd/yyyy each line with a date starts with a D. like this: ...
2
votes
2answers
6k views

Notepad++ Search & Replace with Regular Expressions

I know its simple, but I can't get it to work... I have a strings like {span style="display:none"}123{/span} and {span style="display:none"}456{/span} and {span style="display:none"}789{/span} ...
2
votes
2answers
1k views

Dreamweaver - Replace with Regular expressions?

I've got like 6 pages were i get both POST and GET data several times (PHP). I've now made a function that get's the data for me, so instead of typing: $_POST['whatever']; i now type: ...
2
votes
1answer
1k views

how to remove html comment tags using sed?

I want to remove comment tags in an html file. <!--- <script save and execute me> --> must become: <script save and execute me> I tried sed -i s_^<!-- \(.*\) -->$_\1_ ...
2
votes
3answers
19k views

Using wildcard search/replace in Notepad++

Here's my problem: In a .txt file, I need to find and replace thousands of instances of syntax like this: (see (a053007djfgspwdf)) or (see (a053007djfgspwdf) and (a54134xsedgeg)) or (see ...
2
votes
1answer
84 views

REGEX Replacement Syntax for NOTEPAD++ 6.5

I need to locate strings like R[A-Z][A-Z][0-9] (this syntax works) and replace the first character with 3 which leaving the remaining characters the same. What is the "replace" syntax?
2
votes
2answers
2k views

How to replace a specific character between specific words?

Would you be able to help me in finding out how I can use the Notepad++ Find/Replace function to replace a specific character between specific words. Please see the example below, I would like to find ...
1
vote
1answer
76 views

Notepad++ replace every 3rd and 4th iteration

I'm using notepad++ I'm wondering if it's possible to replace every 3rd and 4th iteration in lines of HTML. The original code looks like: <div class="ui-bar ui-bar-d" <div class="ui-bar ...
1
vote
1answer
976 views

How to replace a word with Regular Expression in Microsoft Word 2007?

How can I replace a word with Regular Expression in Microsoft Word 2007? For example, I want to find and replace all \n with some spaces.
1
vote
1answer
2k views

Search & replace with wildcards and variable length strings in Notepad++

I am trying to edit a series of strings in Notepad++ using search & replace. What I'd like to do is to search for a particular piece of HTML code, then delete a portion of it. The challenging ...
1
vote
1answer
178 views

How do I remove HTML from MS Word 2010 document with Find/Replace Wildcards/Regex?

I found a website to help me choose domain names. I have my shortlist which I can't export, but I need to share the list with some other team members first. It also won't let me copy and paste the ...
1
vote
1answer
51 views

Automatic replacement of expressions

Maybe this can be achieved through (extended) regular expressions, but I really don't know if or how. There seems to be a way to access "things that are found" by using $1, $2, … but I have no idea ...
0
votes
1answer
52 views

Mark all URLs ending with .se (Notepad++)

I got a massive document with text. I want to mark all the URLs ending with .se I managed to mark the part of the url just before .se with \w+\.se. But some of these URLs got 3-4 subdomains. So if I ...
0
votes
1answer
558 views

How to find and replace in the between tags in notepad++

I have a problem about find and replace in notepad++. I want to find a space+space in text and replace with just one space. But the area I want to find and replace is between tags (ex: ...
0
votes
1answer
23 views

How to replace a character from a variable location of a string up to the last character

Question, please: How do I remove characters starting with _ then all the way to the end. Examples are: FC1-46-SCD-02-008-11_14P will be FC1-46-SCD-02-008-11 FC1-46-SCD-02-0008-11D_0P will be ...
0
votes
2answers
64 views

Search Replace extended in a html file

i have a little question. I have a big html file and want to replace lots of things inside a lot of times. The only problem i cant solve is a replace with a variable. Example: <image ...
-1
votes
2answers
42 views

How to delete word and all words after that

I have this URL: https://www.facebook.com/photo.php?fbid=611377065590688&set=a.320150204713377.74079.229899403738458&type=1 I want to be: ...
-1
votes
1answer
224 views

Microsoft Word Wildcards

This is long, I hope I made it clear! Please ask if something is not explained correctly I have a document that has the word "The" capitalised in many places it shouldn't be. I wish to change "The" ...
0
votes
1answer
118 views

Bash: exact match of a string with regex

I have to do an exact match on a string with a regex. i have to realize this pattern: toCheck must start with 2 occurrence of $str1, with max 1 occurrence of $str2. If toCheck match the pattern, i ...
0
votes
1answer
23 views

Return / transform then return pattern with nulls

I'm using grep/sed to parse a large binary file full of nulls for some specific data. This is in a windows environment using gnuwin32. Assuming I had some to return some data from a binary file that ...
0
votes
1answer
20 views

Remove beginnings of email addresses from text using grep or sed

I have a text file with lines like the following: John Stevenson Johnnyboy34 john.stevenson@company.com 0320423\n Mike Anderson AndersMike mike@mikeltd.foo 0234234 How do I remove the "text" ...
0
votes
2answers
11 views

How To Search & Replace From a Word to another in The Same Line?

Like I said,, I want to search each line, from a word at the beginning of the line, To another word at the end ! For Example, let's say that I've a text file, that contains these lines :- 1.RA.xm: ...
0
votes
1answer
69 views

How to extract everything between <table> and </table> in multiple HTML files

I have been trying to extract this data for a couple of hours without luck. I either want to just extract all the table tags from the HTML and save them to a separate file or everything between these ...
0
votes
0answers
10 views

Upping all seconds of X value

I have a subtitles file. What regex should I use in Notepad++ to up every line of 2 seconds? 00:01:15,444 --> 00:01:17,613 should become 00:01:17,444 --> 00:01:19,613
0
votes
2answers
2k views

Why escaped single quote doesn't work in grep?

I am trying to match a string: * * * * * /usr/local/bin/growlnotify -t 'helloTitle' -m 'helloMessage' -n 'myApp' -sw with: crontab -l | grep '^[^#].*/usr/local/bin/growlnotify.*\-n \'myApp\'.*$' ...
0
votes
0answers
18 views

LDAP role/group membership

We have many users registered in our LDAP auth. So far we've only stored login and mail-related information in this LDAP. In our main application (Play! Framework), we needed to modelise roles ...
0
votes
0answers
33 views

Multiline find and replace wrapper with wildcard inside

I'm trying to put a wrapper around a bunch of fields that already exist. I want to convert this: <div class="editor-label"> @Html.LabelFor(Function(model) model.FirstName) </div> ...
0
votes
2answers
27 views

Fix problematic number formatting

In a spreadsheet I have several columns which had the following number format: 233,95. I have replaced all commas with dots, to 233.95, but it turns out that this was not such a good idea as there are ...
0
votes
3answers
54 views

need a regular expression command [closed]

How to take the word 'healthcare' from the word 'vendor_reg_analysis_healthcare.xls', By using the regular expression command SO by telling in detail , I need to take a word after third _ from the ...
1
vote
1answer
30 views

Notepad++ remove comma from string

I have about 5000+ lines in a csv file. Part of each line looks like this: ...Name 1:, Smith, John, Name 1 #:... ...Name 1:, Doe, Jane, Name 1 #:... I need a regex that will remove the comma ...
0
votes
2answers
17 views

Notepad ++ : How to Replace as the description

I have lines like these abye/>abye abys/>abys aced/>aced aces/>aces I want it like this abye abys aced aces Is it possible? If it is then please someone show me the way.
4
votes
2answers
2k views

Can Outlook Search use Regular Expressions (or wild cards)?

I'd like to search my Outlook email with regular expressions. Is this possible? If not, is there any sort of non-regex wildcard functionality? Without any sort of plug-in is preferable, but if not, ...
2
votes
2answers
49 views

Live-preview lines filtered with a stack of filters?

I would like to have a live preview of a filtered plain text lines. It is important that multiple filters need to be applied either exclusively or inclusively (similar to the filters in process ...
2
votes
2answers
30 views

RegEx is matching characters before I want it to

I need to parse a string that looks like this: A Christmas Special - Special of the day into 3 or 4 distinctive groups depending on if the - character is present in the original string or not like ...
0
votes
1answer
29 views

Choose first comma after specific pattern on each line

I have almost thousand lines each with the same structure and I have to edit one part of it. "650","4","The lenght of this part varies, Here's some commas, here, and, there" "203","4","Now this is ...