Can I find lines that have similar and different text in.
eg:
As you will see the lines have a similar date in but different times....I would like to find these lines completely.
2018-05-28 00:10:37 @ user
2018-05-27 00:40:37 @ user
2018-05-26 01:10:37 @ user
I also want to use the regex for finding and replacing lines in a text editor.
finding lines with similar text
Re: finding lines with similar text
Unfortunately, that's not possible with Everything. You can search for text - using the content: function - but only matching filenames will be listed.
I think you need a script to do what you want.
P.S. On the to do list is a feature that will show the text highlighted in the preview pane.
I think you need a script to do what you want.
What do you mean by that? What text? What replacement?
P.S. On the to do list is a feature that will show the text highlighted in the preview pane.
Re: finding lines with similar text
Not madly important for everything as I can find ways around it but I'm using emeditor and I was wondering what regex I could use on that for a search and replace...
Re: finding lines with similar text
Could you give a couple of examples of lines you want to be found and how they look after replacement?
Re: finding lines with similar text
I keep a copy of everything I type, unfortunately the programme doesn't allow me to omit the time and date of when things are typed so I end with a lot of unwanted entries.
I want to be able to search for all these entries and delete them (replace with blank line.
So, for example, I want to delete these entries and just end up with blank lines so that I can then run a "remove blank line" option.
2018-05-28 00:10:37 @ user
2018-05-27 00:40:37 @ user
2018-05-26 01:10:37 @ user
I want to be able to search for all these entries and delete them (replace with blank line.
So, for example, I want to delete these entries and just end up with blank lines so that I can then run a "remove blank line" option.
2018-05-28 00:10:37 @ user
2018-05-27 00:40:37 @ user
2018-05-26 01:10:37 @ user
Re: finding lines with similar text
Don't know about emeditor specific, but generally that would be something like:
Search for:
Replace with: (nothing)
Some explanation:
^ = start of line
\d{4} = 4 digits (0-9)
\s = a space
$ = end of line
\n = "Enter" / go to new line. That way you don't have to remove the empty lines manually. Maybe emeditor wants \r\n instead of \n.
Let us know if this works (test it on a copy of your file to prevent data loss)
Search for:
^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\s@\suser$\n
Replace with:
Some explanation:
^ = start of line
\d{4} = 4 digits (0-9)
\s = a space
$ = end of line
\n = "Enter" / go to new line. That way you don't have to remove the empty lines manually. Maybe emeditor wants \r\n instead of \n.
Let us know if this works (test it on a copy of your file to prevent data loss)