JSVerbalExpressions icon indicating copy to clipboard operation
JSVerbalExpressions copied to clipboard

Not able to create expressions for OR and AND type statements

Open AkhileshShahare opened this issue 3 years ago • 0 comments

Hi @shreyasminocha and @ionutvmi,

Thank you for this amazing library!

I have been trying to generate a regex for the following statements:

  1. There is no entry for min-power-bark or max-power-bark in the text
  2. The values for min-power-bark is 9 and max-power-bark is 127

Expressions I have tried, but I am able to get them to work:

1. VerEx()
  .beginCapture()
  .not(min)
  .or()
  .not(max)
  .endCapture();

Regex : /(?:((?!min-power-bark))|(?:(?!max-power-bark)))/gm
2. VerEx()
.beginCapture()
  .then(min-power-bark+ ": ")
  .beginCapture()
    .digit()
    .repeatPrevious(1)
  .endCapture()

Regex: /((?:min-tx-power\: )(\d{1}))/gm

Could anyone please help me with this ?

AkhileshShahare avatar Jun 22 '21 06:06 AkhileshShahare