Missing space in the text (regex)

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

Missing space in the text (regex)

Post 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
therube
Posts: 4967
Joined: Thu Sep 03, 2009 6:48 pm

Re: Missing space in the text (regex)

Post 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]).
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Missing space in the text (regex)

Post 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.
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Missing space in the text (regex)

Post by Debugger »

\.[a-zA-Z](!(http|https)) not work for me
vanisk
Posts: 152
Joined: Sat Oct 27, 2018 11:33 am

Re: Missing space in the text (regex)

Post by vanisk »

It'll be easier for others to answer, if you could post some sample lines of text and sample of expected output.
void
Developer
Posts: 16698
Joined: Fri Oct 16, 2009 11:31 pm

Re: Missing space in the text (regex)

Post by void »

Maybe something like:
^(?!(https://|http://)).*\.[a-zA-Z]
therube
Posts: 4967
Joined: Thu Sep 03, 2009 6:48 pm

Re: Missing space in the text (regex)

Post 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.
Debugger
Posts: 630
Joined: Thu Jan 26, 2017 11:56 am

Re: Missing space in the text (regex)

Post 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.)
Post Reply