Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Also known as regular expression or regexp, a description of a set of strings, often used for searching and validating strings.

0
votes
3answers
38 views

sed regex with '+' doesn't work - why?

I don't understand it. I'd like to replace the ip-up 9490:notify_rc string to ip-up ****:notify_rc. I thought it's simple: echo "ip-up 9490:notify_rc" | sed -e 's/ip-up [0-9]+:notify_rc/ip-up ****:...
1
vote
1answer
34 views

Notepad++: Replace last appearance of semicolon in every line?

My lines look like this: a;b;c;d e;f;g;h i;j;k;l;m;n;o;p What i want is this: a;b;c;-d e;f;g;-h i;j;k;l;m;n;o;-p I want to add a minus after the last appearance of a semicolon. Any help is ...
0
votes
1answer
28 views

Replace an entire word based on pattern using SED

I have a bunch of virtual machines that I deploy over and over again in a large automated test environment. Each VM, after it gets deployed, writes its hostname to /etc/hosts. 127.0.0.1 XXXX-...
1
vote
1answer
54 views

Notepad++ merge all lines that do not begin with a date

I have .csv file in Notepad++ that contains data like this: 1-6-2018,"(101)","","Sale",-862.96,, "(Sale)",,837.96, ,"Diesel",12.000 Ltr,69.83/Ltr,837.96, "Sales @ 5%",,23.80, ,"Polishing Cloth",1 ...
0
votes
0answers
6 views

How to use preg_replace() to replace only specfic lines [migrated]

I have a table of data having same order like this 123.- sumi hai bla 124.- the secod line is blah 125.- another line And what am trying to get is something like this using php preg_replace() 123.- ...
3
votes
1answer
31 views

Notepad++ Don't skip to next instance after search and replace

I am using the search and replace function in notepad++. Since it involves some regex, I would like to see the result after each single search and replace. However, if I click on Replace, the instance ...
-1
votes
0answers
76 views

Create new .vcf files from a single .vcf file by using regex

Exporting personal contacts from a mac gave me 1 .vcf that contained multiple contact data between BEGIN:VCARD and END:VCARD tags What can I write to extract data using a regex from this file and ...
0
votes
2answers
48 views

Removing White Space from a Regex result

I have a Regex query that works to find the data: Matching a 9 digit number (not more, not less), with some being separated by a space or -. (?:\d{9}\s)|(\d{3}[ -]\d{3}[ -]\d{3}) The problem I have ...
0
votes
1answer
80 views

VBA macro Enforcing specific input in a cell with a regular expression

I need to restrict the user when he tries to input some string in a cell, this input to be restricted to the following list: C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 ; words: merge,complete ...
0
votes
1answer
25 views

Execute multiple regex one after another or combine multiple regex into one

I am using notepad++, I have wrote few regex which have eased my work in formatting file. However to format the file in desired format I have to execute multiple regex, I wanted to know is there some ...
1
vote
1answer
50 views

VS Code Find in current file: Regular Expressions

This is find and replace issue in VS Code. I want to find the following text in my Markdown file in VS Code: ## [](https://www.website.com/)Heading and Replace with this text ## [Heading](https://...
1
vote
2answers
76 views

Remove span class through regex in Notepad++

I have big file catering to 1000+ span class for pagenumbers. I would like to remove the complete syntax with the text in notepad++ through a ReGex. Example,<p>Cillacepro di to tem endelias ...
0
votes
1answer
54 views

How to do a regular expression find replace in anki?

I need to do a find and replace in all cards using the following settings: As an example I want to find: <span style="color: rgb(255, 255, 255)">Word</span> and change it to Word In ...
0
votes
1answer
28 views

Matching the first line after a bracket in Lint

I'm making a custom rule for programming language Lint to : match 1 or more empty lines after {, and another rule to match empty line before }. As an example in this code, I want these rules to ...
0
votes
2answers
34 views

How do I delete all text before and after a specific naming convention appears in Notepad++

This is what I want to do: BEFORE: AVCHD/2017-08-25/20170824_GV_GLW_C102/private AVCHD/2017-08-25/20170824_GV_GLW_C102/private/AVCHD AVCHD/2017-08-25/20170824_GV_GLW_C102/private/AVCHD/BDMV ...

15 30 50 per page