Skip to content

Commit 228931c

Browse files
committed
improve(series import): extract quantity from lux blocks.
Fix #1313
1 parent 7b1efcb commit 228931c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/ru/mystamps/web/feature/series/importing/SeriesInfoExtractorServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class SeriesInfoExtractorServiceImpl implements SeriesInfoExtractorServic
6161
// Regular expression matches number of the stamps in a series (from 1 to 999).
6262
// CheckStyle: ignore LineLength for next 2 lines
6363
private static final Pattern NUMBER_OF_STAMPS_REGEXP = Pattern.compile(
64-
"(?<quantity>[1-9][0-9]{0,2})(-?(ти|ой|ух))?( ((без)?зубцов(ая|ы[ех])))?(м\\*{0,2}| (мар(ок|к[аи])|блок(а|ов)?|БЛ))",
64+
"(?<quantity>[1-9][0-9]{0,2})(-?(ти|ой|ух))?( ((без)?зубцов(ая|ы[ех])))?(м\\*{0,2}| (мар(ок|к[аи])|(люкс[- ])?блок(а|ов)?|БЛ))",
6565
Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE
6666
);
6767

src/test/groovy/ru/mystamps/web/feature/series/importing/SeriesInfoExtractorServiceImplTest.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,8 @@ class SeriesInfoExtractorServiceImplTest extends Specification {
416416
'32 БЕЗЗУБЦОВЫЕ МАРКИ' || 32
417417
'1 блок' || 1
418418
'4 блока' || 4
419+
'2 люкс блока' || 2
420+
'2 люкс-блока' || 2
419421
'6 блоков' || 6
420422
'6 БЛ' || 6
421423
'6 зубцовых блоков' || 6

0 commit comments

Comments
 (0)