You are here: PSPad forum > English discussion forum > The regular expression does not support all possible combinations of verses to be extracted

The regular expression does not support all possible combinations of verses to be extracted

#1 The regular expression does not support all possible combinations of verses to be extracted

Posted by: PSPad | Date: 2022-08-14 20:43 | IP: IP Logged

Please help. The regular expression does not support all possible combinations of verses to be extracted.

My Regex:([0-9]* {0,2}[A-Z]{1}\w+[,.;:]? {0,4}[xvilcXVILC\d]+[.,;:]( {0,2}[\d-,]{1,7})+)([,.;:] {0,4}[xvilcXVILC]*[.,;:]( {0,2}[\d-,]{1,7})+)*

Example verses in lines
Ps 22:27-28; 98:2-3; Isa 42:1-4
Zec 14:9; Ga 1:1; 1Ti 2:4

Options: Reply | Quote | Up ^


#2 Re: The regular expression does not support all possible combinations of verses to be extracted

Posted by: tmpad | Date: 2022-08-17 11:15 | IP: IP Logged

What exactly do you expect as output from the two examples? Which matching sub-expressions do you expect?

For example, "Ps 22:27-28; 98:2-3; Isa 42:1-4" can be broken up in several ways:

1) Ps 22:27-28; 98:2-3
2) Isa 42:1-4

or
1) Ps 22:27-28
2) 98:2-3
3) Isa 42:1-4

or
1) Ps
2) 22:27-28
3) 98:2-3
4) Isa
5) 42:1-4

etc.

Options: Reply | Quote | Up ^


#3 Re: The regular expression does not support all possible combinations of verses to be extracted

Posted by: PSPad | Date: 2022-08-18 12:57 | IP: IP Logged

Where there is no book name is a continuation of the earlier book name
Example Source:
Isa 42:8; 44:6,8; 45:5-6; Jer 10:10-11

Result:
Isa 42:8; Isa 44:6,8; Isa 45:5-6; Jer 10:10-11

Edited 1 time(s). Last edit at 2022-08-18 12:59 by PSPad.

Options: Reply | Quote | Up ^






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