Community Patterns

Community Library Entry

1

Regular Expression
Created·2025-03-13 10:17
Flavor·Java

"
^(\d+|-\d+|-?\d{1,2}%|-?100%|(-?\d+<(-?\d{1,2}%|-?100%|-?\d+) )*(-?\d+<(-?\d{1,2}%|-?100%|-?\d+)))$
"
gm
Open regex in editor

Description

Validation pattern to validate the minimum_should_mach value in opensearch and elasticsearch queries. For more information on the minimum_should_match field have a look here for opensearch or here for elasticsearch

Submitted by Hackante