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)

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
370 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
53 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
83 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
1k 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
26 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
68 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
57 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: ...
0
votes
1answer
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
1answer
58 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
15 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
89 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
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
51 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
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
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 ...
1
vote
1answer
78 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
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.
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
56 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
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
47 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 ...
1
vote
1answer
106 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, ...
0
votes
1answer
180 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= ...
2
votes
0answers
577 views

LogRotate use regex for filename

I have a custom logging class that creates a log for each instance of the process and adds a unique id to the log file name, example: process.1234.log process.1235.log Also I can add a date/time ...
2
votes
2answers
445 views

display and remove all chars > ascii code 127

How can I display and remove all chars > ascii code 127 from a file? file is unicode 16bit UPDATE Dennis has solved it but there is some interesting discussion about number ranges.
0
votes
1answer
63 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. ...
3
votes
4answers
13k views

notepad++ regexp to find all lines which contain a specific string

I am looking for a notepad++ regexp that contains a specific string. I then want to delete this whole line.
1
vote
1answer
48 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
64 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
79 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 ...
28
votes
10answers
24k views

Renaming many files in Mac OS X, batch processing

I used to rename file in Linux via a rename command: rename 's/old_pattern/new_pattern/g' *glob Is there something similar in Mac OS X (Snow Leopard)?
0
votes
0answers
81 views

Firefox Extension To Save To Folder Named After Text On Webpage

I am wanting to find or create a Firefox Extension that can create and save to a folder, based upon the text in a page's tag. I would want it to do the following: Check the page's html for a ...
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
479 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 ...
2
votes
1answer
48 views

find using regexp and echo matches

I have about 50 users in /home/ directory and I have cloned a git repository to everyone: Executed at /home/ as root user: find . -maxdepth 1 -type d ! -name . -prune -exec git clone ...
0
votes
1answer
26 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 ...
-2
votes
1answer
75 views

Grep word in one file, and use that word to match in another file, adding the thing that follows the match

I want to grep several words in file1, and use each word to grep what follows after its match in file2. And then I want to add the string that followed the match to the word I used into file03, so ...
-5
votes
1answer
92 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
101 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
86 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 ...
2
votes
3answers
355 views

How can I find all files on a folder tree that have a none alpha numeric characters in it

I have taken over from someone else a lot of historic data. However the file names are totaly random and badly formatted IMHO. To start with I want to get a list of all files that contain spaces, or ...
1
vote
1answer
217 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 & ...
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
72 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: ...
2
votes
1answer
13k views

.htaccess 301 redirect with regular expressions

If I have: redirect 301 /users/foo http://www.example.com/profiles/foo redirect 301 /users/bar http://www.example.com/profiles/bar Can I do something like? redirect 301 ^\/users/(.+)$ ...
4
votes
1answer
524 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
450 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 ...