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
2answers
83 views

Notepad++ Replace Iteration

(I have edited this post for clarity) I have a terribly formatted text document.. Luckily, though terribly formatted, it's reliably terribly formatted and so regex has saved me days worth of work. ...
-1
votes
1answer
139 views

Mac Word 2011 Regex

So my question is about regular expressions in Mac Word 2011. I have the following phrases that need to be found within a document and would like to get rid of them all at once. Examples: [set C/G, V ...
0
votes
2answers
56 views

Delete lines which have a particular word

I have a list of links like this http://mysite.com/wp-content/uploads/dogs-24x100.png http://mysite.com/wp-content/uploads/dogs-640x2648.png http://mysite.com/wp-content/uploads/dogs-72x300.png ...
0
votes
3answers
240 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
43 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
76 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 ...
1
vote
1answer
63 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 ...
0
votes
1answer
119 views

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

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
2answers
92 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
915 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 ...
2
votes
2answers
2k 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 ...
1
vote
2answers
101 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
1answer
68 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
120 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
2k 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
26 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
2answers
20 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
66 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
0answers
12 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
1
vote
0answers
53 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
1answer
292 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> ...
1
vote
1answer
91 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
29 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
2answers
22 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.
0
votes
3answers
57 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 ...
2
votes
2answers
34 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
51 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 ...
0
votes
1answer
197 views

Find and replace using wildcard/regex characters in Notepad++

I have an HTML Code with the following structure: <td class="tar"> <div class="bubble in"> Some Text, I want to keep! And maybe even an image: <img src= ...
0
votes
1answer
68 views

specify the regex dot `.` and `..` in powershell to find files/directories?

I find powershell in some ways, can do regexes to a limited extent. No doubt it can do more but I can't see why it isn't here. I'm trying to use a regex to specify files/directories. For example, ...
0
votes
3answers
34 views

text file — search via regex, bold the results in order to physically print out

i can't think off the top of my head an app which will allow me to do this. i have a document with hundreds of lines, i want to search via a regular expression and either bold or italicise the hits. ...
37
votes
11answers
7k views

How can I delete everything after the first column in Notepad++?

I'm trying to get rid of everything after a column in Notepad++. Column mode is not an option. Is it possible? What I have: 70.97.110.40 159 ms [n/a] 21 ...
3
votes
1answer
51 views

How to remove text that does not contain spaces from a delimited string in Notepad++

I have a string such as brown,Ceilings,flu,hydraulic bar stool,horse saddles,marble tiles. I want to remove the text that does not contain spaces, but keep the text that has at least one space. The ...
1
vote
2answers
67 views

Need to add missing iteration id numbers to a series in text or excel. How to get this done without coding?

I have a text, csv or excel file that looks like ||--ID-----||--Name--||--Date of birth--|| 1 Jo 1/1/11 32 Mo 2/2/12 3382 Ro 3/3/10 ...
0
votes
1answer
86 views

Using Notepad++ search/replace PHP code with regexp

I don't have experience in regexp so I hope someone will able to help me to change faster than by hands Need to replace objects to arrays like $variable -> child; OR $variable->child to ...
0
votes
1answer
218 views

How to use backreferences in oracle sqldeveloper find/replace

How do you use backreferences when doing regular expression find/replace in Oracle SQLDeveloper? \n doesn't work for me and neither does $n.
0
votes
0answers
31 views

RegEx formula for copying comma-separated target glossary terms to a new line

I have a tab-separated two columns glossary that contains mostly target, rarely source terms separated by a comma and followed by white-space like: abarbeiten-TAB-execute, perform and denken, ...
0
votes
2answers
523 views

Increment version text stored in a bash script file

I have a bash file and I want to store a version text in it (preferably "echo version 1.0.1" so that it automatically prints out its own version when executed) I am trying to make a command group ...
0
votes
1answer
28 views

Is it possible to extract multiple groups at once when fontifying with font-lock?

I'm trying to wrap my head around font-lock-keywords format, particularly MATCH-ANCHORED variant, but I don't see how would I re-use matches generated from one regexp. Below is my setup for ...
-5
votes
1answer
97 views

Remove two dots back from end of line

I need to use regex to remove all text starting at the end of line and going back two dots. gtk2-2.24.22-2.fc20.x86_64 becomes gtk2-2.24.22-2 This is the output from rpm -qa to a text file, and ...
0
votes
1answer
112 views

Notepad++ regex - numbers

I tried to search for it and experiment it out, but I couldn't figure it out. In notepad++ I have a line like: 102. or 12 and I would like to delete the whole line (so i would need \n\r I ...
0
votes
1answer
88 views

Notepad++ regex

I have a wall of text (no code, numbers or anything like that). The sentences are sometimes split in the "middle" by a "paragraph" or "manual line break". For example: The most obvious part was a ...
1
vote
1answer
235 views

Remove duplicate lines in LibreOffice / OpenOffice Writer

I'm working on a text file in Writer which is basically a sorted list of words and phrases. It contains some duplicates I want to remove. Normally I would use a regular expression in Search & ...
0
votes
1answer
362 views

Regular expressions in Microsoft Office 2013

I read the articles on regular expressions in Office already. My wish is to manipulate quoted strings. I need to replace the quote characters with parentheses. For example: "Hello World." ...
3
votes
3answers
96 views

Sed replace only in even numbered lines of a file when replace commands are written in a file

I have all the replace commands in a file (say replace.sed) and i use it with -f flag of sed (sed -f replace.sed InputFile). But now i ran into a condition where i need to apply these replace rules ...
0
votes
2answers
77 views

Is there any way to do a plain text regex find and replace with standard Windows software?

Long story short, I need to enable a client to routinely run a regex find and replace that looks like this on many SVG files that are up to 3mbs in size: Find: font-family=".*?" Replace with: ...
1
vote
1answer
112 views

NotePad++ Get words with REGEX Pattern of Delimiters

I am currently using this REGEX to get whole words with a prefix of PRE_ \b(PRE_)\S* This works fine for most cases, but I would like to handle cases when a special character is part of the word, ...
1
vote
1answer
507 views

How do I use wildcards in Notepad++ to 'find and replace' all of this text?

I would really appreciate some help with this. I am working with a large corpus of text that has been marked-up with XML script and I need to tidy some things up. More specifically, there are several ...
4
votes
1answer
627 views

Bash regex to rename set of files

I have to rename a set of files, using the rename command (with a regular expression).  After some tries, I'm not able to find an expression that gets the expected result. I've got a file pattern ...
1
vote
1answer
563 views

Notepad++ Search/Replace Comments { inside } Curly Brackets

is there a way in Notepad++ (whether by Regex or some other way) to replace/remove comments within curly brackets? { some comments { nested comments } need to be deleted } I want to remove the ...
4
votes
2answers
50 views

Rename ':2f' to '-' on folder names in Linux

I've got a hard drive taken from a NAS drive where files had been put on from a Mac - However, some of the filenames had been, for example, 'backup 16/07/14' which has then been changed to 'backup ...