Page 1 of 1

Missing space in the text (regex)

Posted: Tue Feb 12, 2019 10:05 am
by Debugger
It works in the search for missing spaces in the text after the dot.
But what do you change in regex to ignore links in which there is no space after the dot?

Example:
\.[a-zA-Z]
Żyjemy w świecie, który sami sztucznie kreujemy na własne potrzeby.Komplikujemy wszystkie

\.[a-zA-Z] Do not search in http(s). Always search only in text.
https://www.voidtools.com/forum/posting.php?mode=post&f=7#preview

Re: Missing space in the text (regex)

Posted: Tue Feb 12, 2019 4:15 pm
by therube
I'm not understanding?

Looks to me that it is finding an alpha character after a dot (be it in the file name or extension [or path]).

Re: Missing space in the text (regex)

Posted: Wed Feb 13, 2019 8:24 am
by Debugger
It has nothing to do with files, names and Everything, just plain text. Do you know the spelling rules? The dot should be a space, so I want to search and correct the text.

Re: Missing space in the text (regex)

Posted: Fri Feb 22, 2019 8:43 am
by Debugger
\.[a-zA-Z](!(http|https)) not work for me

Re: Missing space in the text (regex)

Posted: Fri Feb 22, 2019 10:34 am
by vanisk
It'll be easier for others to answer, if you could post some sample lines of text and sample of expected output.

Re: Missing space in the text (regex)

Posted: Fri Feb 22, 2019 10:45 am
by void
Maybe something like:
^(?!(https://|http://)).*\.[a-zA-Z]

Re: Missing space in the text (regex)

Posted: Fri Feb 22, 2019 6:18 pm
by therube
Still not sure that I'm following.

Source, assuming that is what is is:

Code: Select all

 Zyjemy w swiecie, który sami sztucznie kreujemy na wlasne potrzeby.Komplikujemy wszystkie

 https://www.voidtools.com/forum/posting.php?mode=post&f=7#preview
(Vim) %s/\./& /g

Code: Select all

 Zyjemy w swiecie, który sami sztucznie kreujemy na wlasne potrzeby. Komplikujemy wszystkie

 https://www. voidtools. com/forum/posting. php?mode=post&f=7#preview
%s/\.[A-z]/\. &/g

Code: Select all

 Zyjemy w swiecie, który sami sztucznie kreujemy na wlasne potrzeby. .Komplikujemy wszystkie

 https://www. .voidtools. .com/forum/posting. .php?mode=post&f=7#preview
Now that is wrong because you have ". .[A-z]", but maybe you can "back-reference" the [A-z] part & copy that over (but I'm not familiar with that).
Otherwise you could simply s/\s\./\s/ afterwards.

And then I take it you want to exclude strings that start with http(s):.
You've got me on that.

Re: Missing space in the text (regex)

Posted: Sat Feb 23, 2019 4:40 pm
by Debugger
void wrote:
Fri Feb 22, 2019 10:45 am
Maybe something like:
^(?!(https://|http://)).*\.[a-zA-Z]
^(?!(https://|http://|www)).*\.[a-zA-Z]


Works well, just add the URL without http(s)
that is, the "www" itself, because not all links contain http(s)

http://website.com.pl
https://website.com.pl
www.website.com


Średniowieczny zamek to prawdziwa zamarznięta historia w kamieniu, w zamkach znajduje się wiele różnych pięknych opowieści i legend. Przy okazji, poleciłbym wszystkim nie-miłośnikom średniowiecznych zamków stronie www.castle.ru


However, this regex still detects some www in the text, so bad.
I marked red+blue in how it detects

It should ignore any URL (http, https, www etc.)