mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 20:59:53 +05:00
RSRParser.RegexpMatched method
This commit is contained in:
@@ -119,6 +119,16 @@ func (prsr *RSRParser) Compile() (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// RegexpMatched will investigate whether we had at least one regexp match through the rules
|
||||
func (prsr *RSRParser) RegexpMatched() bool {
|
||||
for _, rsrule := range prsr.rsrRules {
|
||||
if rsrule.Matched {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func NewRSRParsers(parsersRules string) (prsrs RSRParsers, err error) {
|
||||
if parsersRules == "" {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user