how to remove string before second ":" in notepad++ [closed] - regex

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
I want to get last two strings email#email.com:namesurname from those strings. I know how to remove the last item after : with :.* but how can i do that for first also for those below? Just give me a recommendation if anyone can.
jobapplication:::2017-05-29:email#email.com:namesurname
also like this one:
skills:email#email.com:namesurname
I dont have idea to start it and there are around 3200 job applications.

Use the regular expression ^.+\:(?=\w+\#) to find unwanted string then replace all matches by empty string.

Have you considered recording a quick macro in which you do it once, replace or whatever, then press home home and down arrow to advance to the next line? Then you could do Run For Rest of File and it'd be done. (Make a backup first. ;)) I find the quick macro feature of Notepad++ comes in handy for this kind of thing, and easier (for some of us) to remember how to use than arcane regexes.

Related

Replace number with double quotes from csv file using vi editor [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
I have a CSV file containing the data like below -
"Rank","Domain","Open Page Rank"
"1","fonts.googleapis.com","10.00"
"2","facebook.com","10.00"
"3","twitter.com","10.00"
"4","google.com","10.00"
"5","youtube.com","10.00"
"6","instagram.com","10.00"
"7","s.w.org","10.00"
"8","ajax.googleapis.com","10.00"
"9","linkedin.com","10.00"
How can I remove double quotes from all numbers here using vi editor or similar effect?
Thanks
you could use a regex search and replace:
%s/"\(\d\+\(\.\d\+\)\?\)"/\1/g
"on every line in the file, find...
all strings that start with a double quote...
followed by one or more digits...
optionally, followed by a period, which is followed by one or more digits...
followed by a double quote...
replace the string with the outer capture group...
and do it everywhere it appears on the line.
"

How to edit filenames in bulk using regex? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I don't even know if this is possible.
I have over 4 terabytes of MP3 files and I need a much faster way of editing files. I use a Mac running Yosemite if that makes any difference.
Here is a sample list of files
In bulk, how do I remove the "Elton John", space, hyphen, space, track number, and space from the names of these files, and only leave the track name and file format? Can it be done using terminal and if so, what's the command?
Thanks so much!
brew install rename
rename -v 's/\s*Elton John\s*-\s*\d+\s*-(.*)/$1/' *.mp3
You can use the -n option first to see what would be the changes without affecting the files name.

Notepad++ ignoring end delimiter of RegEx [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have a JSON file. There is some information I want to delete and the process would be quite tedious to be done manually, and incredibly quick to perform through RegEx.
I want to find matches starting by, let's say, "abc" (including quotes), composed by any set of characters (including conflicting ones like brackets), and ending by , (the comma character), new line and " (left quote character).
Although RegEx is not my best strength, I have read several questions that could be related, like this one, and tried out several patterns, being this the one in which I believe the most:
"abc"(.*),^"
But it doesn't work properly. It starts fine, but the part after the (.*) is completely ignored, so the rest of the text in the document is selected instead of only what I requested.
^ doesn't mean newline. It's a "zero-length anchor" that matches the position before the first character of a line.
You want something like
"abc"(.*),\r?\n"

How to use regex to find if a text contains specific words? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am using a file search tool which can use regex to find files which contain certain text. My regex skills are pretty simple. (I am going to assume the file is treated like a single text with some line breaks)
Let's say I want to find files which contain these 3 words: route, boy & skill.
How to create two regex's, one to search for those words where each word needs to be a whole word (white space before or after, at beggining or end of line), and another regex where one or more words could be part of another word (like substring function)?
Update
I am not interested in regex tutorials and testers. If I need one, I certainly can google for one and find dozens. This is a regex that I simply can't create but which I will use over and over in that tool. Maybe regex doesn't support what I want and a regex expert can tell me that's the case. So no amount of regex tutorials and testers is going to help. I appreciate the links but they are not going to help me here.
Try following regular expression:
(?=.*\broute\b)(?=.*\bboy\b)(?=.*\bskill\b)

How can I trim a string starting with a specific expression? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
How do I find and delete the utm_content parameter from all the urls in a file using Notepad++?
Sample data:
http://example.com/content1.html?utm_content=product1
http://example.com/abc2.html?utm_content=homepage
http://example.com/test/?utm_content=sku1234
http://example.com/runapp?utm_content=31231KS
http://example.com/blabla?utm_content=nl-laptops-tablets
Desired result:
http://example.com/content1.html
http://example.com/abc2.html
http://example.com/test/
http://example.com/runapp
http://example.com/blabla
Note: As I understand Notepad++ regular expressions use the standard PCRE (Perl) syntax.
As far as I understand your needs:
search for:
\?utm_content=.*?"
and replace with "
Search for \?utm_content=\w+ or \?utm_content=.* and replace it with a zero string if this is the only one parameter.
Use standard Search & Replace (Ctrl + R)
Edit:
Search: utm_content
Replace:
Press find and then press Replace Rest.