Find the missing dot at the end of the line in the text

Off-topic posts of interest to the "Everything" community.
Post Reply
Debugger
Posts: 530
Joined: Thu Jan 26, 2017 11:56 am

Find the missing dot at the end of the line in the text

Post by Debugger » Sat Apr 20, 2019 9:32 pm

Regex Text Editor

OK:
Find the missing dot at the end of the line in the text.

Missing:
Find the missing dot at the end of the line in the text

vanisk
Posts: 143
Joined: Sat Oct 27, 2018 11:33 am

Re: Find the missing dot at the end of the line in the text

Post by vanisk » Sat Apr 20, 2019 10:49 pm

Make a regex to find
Not Dot and newline character

Debugger
Posts: 530
Joined: Thu Jan 26, 2017 11:56 am

Re: Find the missing dot at the end of the line in the text

Post by Debugger » Sat Apr 20, 2019 11:05 pm

Something is wrong here:
[^.]\r\n

vanisk
Posts: 143
Joined: Sat Oct 27, 2018 11:33 am

Re: Find the missing dot at the end of the line in the text

Post by vanisk » Sat Apr 20, 2019 11:07 pm

Debugger wrote:
Sat Apr 20, 2019 11:05 pm
Something is wrong here:
[^.]\r\n
you are almost correct, but escape the . [Dot has special meaning in regex, so have to escape it]
[^\.]\r\n

Debugger
Posts: 530
Joined: Thu Jan 26, 2017 11:56 am

Re: Find the missing dot at the end of the line in the text

Post by Debugger » Sat Apr 20, 2019 11:17 pm

do not look for a dot at the end of the line:
I want to ignore any URLs
I want to ignore any Cyrillic alphabet

Something is wrong here:
[^\.]\r\n(!?(http|https):\/\/[\w\-_]+(\.[\w]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)[А-Яа-я])

vanisk
Posts: 143
Joined: Sat Oct 27, 2018 11:33 am

Re: Find the missing dot at the end of the line in the text

Post by vanisk » Sat Apr 20, 2019 11:32 pm

Debugger wrote:
Sat Apr 20, 2019 11:17 pm
do not look for a dot at the end of the line:
I want to ignore any URLs
I want to ignore any Cyrillic alphabet

Something is wrong here:
[^\.]\r\n(!?(http|https):\/\/[\w\-_]+(\.[\w]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?)[А-Яа-я])
sample text?

Debugger
Posts: 530
Joined: Thu Jan 26, 2017 11:56 am

Re: Find the missing dot at the end of the line in the text

Post by Debugger » Sat Apr 20, 2019 11:38 pm

https://website.ru/2007/08/22-254
Природа
Лира Неская
Natura... Zawsze była zachętą (bodźcem) do kreatywności i radości
Сколько себя помню, всегда была преданной приверженкой эпикурейства и

vanisk
Posts: 143
Joined: Sat Oct 27, 2018 11:33 am

Re: Find the missing dot at the end of the line in the text

Post by vanisk » Sun Apr 21, 2019 11:15 am

May need some tweaking

Code: Select all

\r\n(?!http|www|А-Яа-я?).+[^\.]

Debugger
Posts: 530
Joined: Thu Jan 26, 2017 11:56 am

Re: Find the missing dot at the end of the line in the text

Post by Debugger » Sun Apr 21, 2019 11:36 am

vanisk wrote:
Sun Apr 21, 2019 11:15 am
May need some tweaking

Code: Select all

\r\n(?!http|www|А-Яа-я?).+[^\.]
I'm sorry, but it's a wrong pattern.
Finds all the text and URL in Emeditor! What totally contradicts what I want to find.

Image

Post Reply