i want to delete the details on regex
-
I have a lot of accounts, and I want to remove all the details [email protected] | example1 | Personal[US] | Verified | | No SMART | No Bank | No Card | Example1 | Example2 | Example3 | Checked on https://www.example.com at 1:43 pm - September 6, 2015 [email protected] | example2 | Personal[US] | Verified | | No SMART | No Bank | No Card | Example1 | Example2 | Example3 | Checked on https://www.example.com at 5:33 pm - September 6, 2015 [email protected] | example3 | Personal[US] | Unverified | | No SMART | No Bank | No Card | Example1 | Example2 | Example3 | Checked on https://www.example.com at 5:35 pm - September 6, 2015 and i want to delete like this [email protected]|example1 [email protected]|example2 [email protected]|example3 question , whats code on regular expression to mass delete?
-
Answer:
You can use the following replacement: Regex: ^([^|]*?)\s*\|\s*([^|]*).* Replacement: \1|\2 See https://regex101.com/r/nT3qP6/1 The regex will match the ^ - start of string ([^|]*?) - 0 or more characters other than | as few as possible (Group 1 - \1) \s*\|\s* - optional whitespace symbols, |, and again optional whitespace symbols ([^|]*) - 0 or more characters other than | (Group 2 - \2) .* - 0 or more symbols other than newline With the back-references to the captured groups, we get our replacement string.
Ÿøga Aprillianšyah N at Stack Overflow Visit the source
Related Q & A:
- What i do if i want to save all my conversations and if i want to watch all conversation on any pc?Best solution by Yahoo! Answers
- How Do I Find Out My Flight Details?Best solution by flightstats.com
- I want to add or delete in the tool bar.Best solution by Yahoo! Answers
- I want to cook Pho but I am not sure if I should add Fred Phelps or Glenn Beck to season it.Best solution by answers.yahoo.com
- Hi friends, I would like to start Cab, so I want more details of best cars and other specifications?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.