You are here: PSPad forum > English discussion forum > regex101.com

regex101.com

Goto Page: Previous1 2

#11 Re: regex101.com

Posted by: maki | Date: 2019-05-06 13:46 | IP: IP Logged

The text does not contain any tags, this is plain text with hyperlinks.
Partially solved. Now the match only matches the sentences in the text, but you have to take into account that some sentences start with a dotted numbering: eg 1. and this pattern does not match.

Example:

1 sentence (wrong)
1. Naprawdę chcemy, aby nasze pragnienia były urzeczywistniane w rzeczywistości.

1 sentence (correct)
1. Naprawdę chcemy, aby nasze pragnienia były urzeczywistniane w rzeczywistości.

2 sentence:
Naprawdę chcemy, aby nasze pragnienia były urzeczywistniane w rzeczywistości 24/7. 2 miliony lat przed naszą erą!

Edited 1 time(s). Last edit at 2019-05-06 13:47 by maki.

Options: Reply | Quote | Up ^


#12 Re: regex101.com

Posted by: pspad | Date: 2019-05-06 14:09 | IP: IP Logged

Do you see how important is to write examples?

There is many other problems. What about: "e.t.c." ?
It's 3 sentences for you?
What about decimal point in numbers? What about dates and decimal point? What about shortcuts, e.g. Mr. President?

To get any "near real" number of sentences, you will find it's not easy.

Options: Reply | Quote | Up ^


#13 Re: regex101.com

Posted by: maki | Date: 2019-05-06 18:23 | IP: IP Logged

I have written many thousands of words, and a few million characters, but at the beginning there are no such words. "Etc." and "Mr. President" and other similar word(!)
To avoid empty lines, or without adding separators, I add to separate some of the essay texts.
  I have numbered the sentences.
So you can have only the number with a dot at the beginning of the line (but not in all cases - numbering, just plain text).
So you have to put on an expression that only takes on the beginning and every next text is allowed. It is as most - possible.

Options: Reply | Quote | Up ^


#14 Re: regex101.com

Posted by: pspad | Date: 2019-05-06 20:22 | IP: IP Logged

Did I write its sentence start? No, I didn't. You can find it anewere i side the sentence.

It's true, mr. Maki, that Karel I. was king.

One sentence with three dots.

Options: Reply | Quote | Up ^


#15 Re: regex101.com

Posted by: maki | Date: 2019-05-07 09:28 | IP: IP Logged

You are right, in some cases a counting error may occur, e.g. in the case of a shortcut. But I think that such mistakes will be not much. This will not be avoided. Well, unless it is corrected that the word (with a dot) must contain at least 2 characters. But it is not so sure. Currently I have a new pattern, now it counts sentences better. But this is not the end of improvement.

Currently an example from post #11 solved.

Options: Reply | Quote | Up ^


Goto Page: Previous1 2





Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR