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
23 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
44 views

need a regular expression command

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
15 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
15 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
1k 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
48 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 ...
-1
votes
0answers
14 views

Extracting string with start and end parameter Using Regex

I have a string "My Name is Khan and I am not a terrorist" with starting word as Name and ending word as not. So i need a Regex which will output "is Khan and I am"
2
votes
2answers
27 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
26 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
54 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
41 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
523 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
429 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
19 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
23 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. ...
34
votes
10answers
4k 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 ...
15
votes
4answers
3k views

Substitution in text file **without** regular expressions

I need to substitute some text inside a text file with a replacement. Usually I would do something like sed -i 's/text/replacement/g' path/to/the/file The problem is that both text and replacement ...
3
votes
4answers
9k 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
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
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\'.*$' ...
1
vote
1answer
31 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
30 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
26 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 ...
23
votes
10answers
20k 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
78 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
25 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
22 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
48 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
36 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
16 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
71 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 ...
-4
votes
1answer
55 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
42 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
41 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 ...
0
votes
1answer
23 views

OS X: Copying only files without a special string in filename

I have to copy only files from a folder that don't have following string in its filename: NNNNxNNNN (a 3 or 4 digit number followed by the character x followed by a 3 or 4 digit number again -> it's ...
2
votes
3answers
243 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 ...
0
votes
1answer
69 views

Microsoft Office 2013: Regular Expressions

I read the articles on RegExp in Office already. My wish is to manipulate quoted strings. I need to replace the quote characters with parentheses. For example: "Hello World." should be replaced as ...
1
vote
1answer
38 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
55 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
0answers
43 views

Bulk Image Downloader not downloading images ending with the multiple of 100

I was using BID to download images off a website. It has a multipage gallery with each page holding 50 images. I added an expression to detect the pages, as the pre loaded ones didn't seem to get ...
0
votes
2answers
53 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
11k 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
79 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
123 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 ...
1
vote
1answer
69 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
32 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 ...
0
votes
1answer
36 views

Weeding out invalid html code with regex

I need a pcre regex that will select all html img tags without a src part. Long story. With help I got to (?-s)<img(?!.*?src).*?\/> which worked fine until a line got a second img tag WITH src ...
5
votes
2answers
304 views

Checking file names inside a directory with Regular Expressions

I have a list of files inside a directory and I want to make a bash script which uses a regular expression to check if every file name inside it has this syntax: xxxx_xxxx_xx_xx Where x are ...
0
votes
2answers
37 views

How to download all file with name emp* using curl from a FTP site

How can I get all files downloaded from a FTP site directory with file name like emp*. Please suggest.
1
vote
1answer
36 views

Insert a line of text before lines matching a regex in vim

I'm attempting to add a column to an HTML table using vim so I need to add a pair of <td> tags the line before each </tr>. So far I have :186,$s/ <\/tr>/<td><\/td> \n ...