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

RegEx with Word 2013. Match string AFTER known word to End of Line or <table>

I'm using the Find and Replace feature in a large word document I have. I need to find the word REMARKS: (all bold and upppercase). REMARKS: THIS IS SOME IMPORTANT DATA At then end of that line ...
0
votes
2answers
46 views

Extracting named groups of regular expression in LibreOffice Calc

In Python 3, it is quite easy to extract text from named groups as shown in the following example: import re myStr = r"4000/2000/5000/7000" reObj = re.compile(r"""(?P<g1>\d+) # a capturing ...
-2
votes
0answers
21 views

RegEx invert selection does not work right!? [on hold]

RegEx invert selection does not work right Where am I doing wrong ^((?!\b(http|ftp|https)s?:[^)''"\s]+.(?:jpg|jpeg|gif|png)).)*$
1
vote
3answers
26 views

Notepad++ regex not working

I am trying to use Notepad++ and regular expressions to remove all XML from Windows' events. My regular expression is as follows: Event Xml:(.|\n)+?Event>\n Example Windows events are as ...
0
votes
2answers
31 views

How can I delete everything else from my txt except hungarian texts?

I have a localisation file from a game, and unfortunately, this file conain all localized language, but I only need is, the hungaryan texts from them. I would like to make a video series from this ...
-2
votes
0answers
41 views

Notepad ++ (REGEX); Invert Selection,

Notepad ++ (REGEX); Invert Selection, The following 2 different codes, it works very nicely. :) now I want to combine these two different code! \bhttps?:[^)''"\s]+.(?:jpg|jpeg|gif|png) ...
0
votes
0answers
10 views

Automatically Monitor and Rename Files with Regex

Is there a tool that allows you to monitor a folder for new files and apply a regular expression to automatically rename the files?
0
votes
0answers
7 views

Possible to use RegEx and Notepad++ to compress repeated words to word counts

I would like to use NotePad++ Find and Replace with RegEx to essentially compress data in a text file. I have data which contains repeated adjacent words such as: [dog][cat][cat][dog][cat] I would ...
-1
votes
1answer
14 views

How to find & replace a pattern with string in ruby?

My file is: [root@test etc]# cat nrpe.cfg command[check_users]=/usr/local/nagios/libexec/check_users -w 30 -c 35 command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c ...
2
votes
1answer
19 views

Bash Regex oddity when using =~ operator

Consider this code: s1="1,2,3,4"; \ s2="1,2,3"; \ sP='^(([1-9][0-9]{0,},){1,2}){1,2}$'; \ [[ "${s1}," =~ $sP ]] && echo "\$s1 matches"; \ [[ "${s2}," =~ $sP ]] && echo "\$s2 ...
0
votes
0answers
29 views

JFlex: multiline string literal (multiline bash commands)

I use JFlex to describe a file format. It uses a literal string to describe the multi-line commands (as in bash). I do so: STRING_LITERAL= "\"" ([^\"])* ("\\\n"|"\"")? Text example: CMD "git ...
0
votes
1answer
11 views

Which of the following use of anchor is correct in regex using grep?

Both of the below commands gives the same output, however which one is the correct method to use it? grep ^'\<that\>' file.txt Searches for the line which has that as the first word grep ...
0
votes
0answers
21 views

fail2ban does not ban IP although there is one failed regex in table

I don't know why fail2ban not adding the bad ip into iptables rules. Here is my setup. /etc/fail2ban/filter.d/http-get-dos.conf [Definition] failregex = ^<HOST> -.*\"(GET|POST).* ignoreregex = ...
0
votes
0answers
16 views

Notepad++ If a line contains a word replace line a certain distance below with a phrase

I'm pretty sure this is possible, and I think it involves Regex, but I have no clue how regex formatting works, and I haven't been able to find the expression I'd need anywhere yet. Basically I've ...
0
votes
0answers
13 views

How to use RegEx modifiers within Ultraedit?

I'm looking for using regex modifiers like (/g global, /s single line, ...) on UltraEdit. I want to use them when applying Find/Replace on my files using UltraEdit. Note: I'm using UltraEdit for ...
0
votes
0answers
7 views

Pattern finding application that generates regex?

I am building rule sets to recognize weak passwords, to do this quicker, I am thinking I will take a cracked password word list from https://hashkiller.co.uk/downloads.aspx and run it through a ...
0
votes
0answers
18 views

Disable emoji icons in Chrome?

I want to disable emoji in Chrome, or replace them with something else (not for any particularly deep reason - figured it'd be amusing). I'm using an extension called Word Replacer II, which allows ...
3
votes
2answers
29 views

Notepad++ RE Search and Replace

Can someone explain why the following record: 1234 4567 blahblahblah becomes blahblahblah When Search/Replace applied (NP++ v6.9) with: Replace:^\d{4}\h with:(nothing) (Reg Exp) radio on Any ...
0
votes
1answer
30 views

How to find wild card value and append to it

I have part of the hundreds of lines similar to : [vc_single_image image="55"] How can I change the lines so they all get appended img_size="full", resulting in [vc_single_image image="55" ...
0
votes
0answers
8 views

.htaccess to hide 2 possible directories

I am having difficulties getting the second statement working regarding admins, i am trying to hide both new and admin parts of the directory. new seems to be hiding fine however admin doesnt want to ...
2
votes
1answer
44 views

Dreamweaver Regex - Unmatched ) in regular expression

The Issue The issue I am tackling is that past developers of some code I am working on set variables like $_GET[name] or sometimes like $_GET['name']. Trying to make the code uniform, I want to make ...
0
votes
0answers
12 views

Dreamweaver REGEX trying to find and replace (or remove)

So far am using this: "http([^>]+) as my REGEX. The page has multiple urls mixed with text and DOM Elements. Something like: <li><a href="http://www.uen.org/toolbox">UEN's Teacher ...
2
votes
1answer
48 views

How To find a word and replace with changing pattern

I have a text like the following: case "UID": if (!Convert.IsDBNull(objDataReader["XYZ"])) { objQualitativeAssessmentBiz.XYZ = objDataReader["XYZ"].ToString(); } break; case "GeneratedChaseId": ...
-1
votes
1answer
42 views

Notepad ++ - How can I replace a line using a column from next line

So the problem is that, I have a really huge file of clients and I need to do this: example1.1@hotmail.com example1@hotmail.com;12345 Became this: example1.1@hotmail.com;12345 ...
1
vote
1answer
52 views

exclude specific strings of words using wildcards

I cannot seem to come up with the appropriate wildcard (I suppose it must be [!]) which would exclude from the expression argument[oales]{1,4} the following three words argumentos argumenta ...
0
votes
2answers
52 views

Notepad++ - replace every first space of a line

I know there are a lot of these types of questions but I can not find a way to alter one of the existing solutions for my problem. My text file looks like this: ...
0
votes
0answers
31 views

Replace using Regex in Notepad++

I want to replace every occurrence between <fb:like href= and </fb:like> in notepad++. I know I can do this with Regex, but i tried for a couple of hours in vain. I have to do this in a ...
0
votes
1answer
18 views

Regular Expressions: Assertions

I would like to know what the definition for an assertion is in the context of regular expressions. If anyone should know, please enlighten me with a brief definition of what it actually is. I would ...
0
votes
2answers
25 views

Notepad ++ find and replace issue

I have had some luck with notepad ++ solving some complex find and replace a lot of similar text in around 8000 documents, but not this particular one: In a text file I will have a lot of lines that ...
0
votes
1answer
19 views

How to add quotes to a datestring notepad++ regex

I have a huge text files with date strings in the first column. For further processing, I need to have the date strings in double quotation marks: 2015-11-11 00:00:00.00,59,... Should end up like ...
2
votes
1answer
78 views

How to delete all files that don't have a certain string in their name

I have seen Deleting all files that do not match a certain pattern - Windows command line However, I have not seen anything regarding how to delete everything that does not contain a certain string ...
0
votes
0answers
18 views

Regex search and replace on a webpage

I am proofreading plain OCR generated text on webpages, cleaning up typos (scanos) which I search for and replace using Regex strings. My problem is with the ">" and" "<" characters. How would I ...
0
votes
2answers
51 views

Extract One letter and three numbers from .txt files using Notepad++

I would like to extract from many .txt files a certain data in Notepad++. It has a lot of data in one file, but I only need specific... This is what looks like in a file: ©Q Ńü Vý 8 ź) ...
0
votes
1answer
15 views

Why sed regexp digit character class includes CR character if the last digit is at the end of the line?

I wanted to extract the Content-Length's size from an URL and output the URL + $size on the same line. The data I worked with: > curl -I -s http://yahoo.com HTTP/1.1 301 Redirect Date: Thu, 10 ...
0
votes
0answers
22 views

notepad++ continuing a line from

I have a file with many lines aaaa bbbn* ff fdsfdsf I want to have that but using the extended replacement like \n aaaa,bbbn*,ff,fdsfdsf I looked the internet for a list of these escape ...
0
votes
1answer
25 views

How do I replace the text I searched and that is now highlighted?

I want to replace the " by ' in all the text that are found with regular expression (\w)"(\w). For instance : s"t should become s't. I run the regular expression with the Mark tab, so now all the ...
0
votes
1answer
26 views

Using 'diff' compare usernames from file1 to file2 containing emails

I am trying to identify active accounts over dead accounts and was wondering if diff along with grep or sed or regex can be used, instead of writing a long program. File1 (usernames) ...
1
vote
1answer
17 views

How to replace based on regex in Notepad++

I have json array like that: [ { "id": 2, "title": "Mr", "name": "Harry Robinson", "company": "ResearchBch", "email": "anything", "age": 38, ...
1
vote
1answer
52 views

SublimeText Markdown Extended add Roman Number Highlighting

In this question, I've inquired about how to highlight more than one markdown list punctuation item. I now want to extend the highlighting to roman numbers as well, because those are supported by ...
0
votes
2answers
45 views

Regular expression to select only the line that contain two searched words?

I am not very advanced with regular expression so i am not sure how to do this. Let say i have a text file that contain more then 1000 lines of data. I want to search for the words 'command' and ...
0
votes
1answer
51 views

How can I search for text files that do NOT contain a word?

I need to be able to search a directory for all files that do not contain a certain word. My issue with my approaches so far is that they return every line of every file that does not contain the ...
0
votes
0answers
22 views

Selecting a group in a pattern on ZSH Glob

How can I select a group in a ZSH pattern to be used later in a substitution or a reference? Example: print the files matching a given pattern and followed by a substring of that name selected from ...
1
vote
2answers
35 views

Remove everything from text except what is in brackets with Regex

I would like to use notepad++ to remove everything in a text file except anything found between [ ]. Example: [D-1.1.1-A] - bla bla text here[D-1.1.1-B] - some more bla bla text here[D-1.1.1-C] - ...
0
votes
0answers
20 views

vim regex pattern freezes search?

I need this pattern to find any () and anything inside, whether it be one word or a paragraph over multiple lines. but when the pattern hits the bottom if freezes? I have never encountered this ...
0
votes
0answers
28 views

Why isn't find excluding files with the given regex?

I'm trying to find all files under /mnt/Storage not under /mnt/Storage/.Snapshots. The following works: find /mnt/Storage | egrep -v "^/mnt/Storage/\.Snapshots" But the following does not: find ...
0
votes
1answer
30 views

Selecting all words inside curly brackets to paste into a new file with Notepad++

I have a dictionary document that uses the following syntax: \lem{WORD}{POS}{PL}{DEFINITION} \lem{WORD}{POS}{PL}{DEFINITION} \lem{WORD}{POS}{PL}{DEFINITION} and etc.. I want to select every WORD ...
0
votes
0answers
18 views

regex to match child mount points

I am writing bash script for checking that "child mounts" doesn't exits before "parent mounts" on fstab i.e: if I have the following mounts on fstab: good fstab mount point example first ...
1
vote
1answer
33 views

Multiline Search and Replace in Linux

Tried this with vim, but open to other ideas/suggestions. Would like to perform a search and replace in a file with 12000 lines. Specifically, if an occurrence of "^ SetFontSize 28" exists ...
1
vote
1answer
49 views

Using shell (bash) to determine key for value from file

I am scripting some application deployment and deploy promotion processes using bash (shell). These scripts are being written as a failsafe in case our CI platform ever fails again (as it has ...
1
vote
1answer
49 views

How to download files matching a particular pattern from ftp command line

I am accessing ftp through command line and trying to delete all the files matching particular pattern. But seems it does literal match than regex match. Can somebody suggest anyway that we can do ...