R
R
RusRatibor2020-09-02 19:08:57
IntelliJ IDEA
RusRatibor, 2020-09-02 19:08:57

Why doesn't the regex work in the cucumber step group?

Good afternoon.
For some reason in IDEA the regular expression in the cucumber step does not work - (available | not available). Individually, each of the expressions work, but in a group they do not want to. The problem is the space, if one of the expressions in the group contains a space, then the regular expression does not work. If it is in a group 5f50e60d2cb9c288884279.png
, then it does not find it. 5f50e624c3cc4933159233.png
If 5f50e635a7cff885493558.png
it finds it separately 5f50e6454319e872917633.png

, everything works in regex101 https://regex101.com/r/96SGD7/1 But it is in the cucumber step, no!

@Then (value = "^(.+) > check that the collection element \"(.+)\" at number (\\d+) is in the state (available|not available)(?: editable|)$" , timeout = defaultStepTimeout)

Expected results:

Then Issues_UpdatingFields > check that the collection element "Status Field" at number 2 is in the state not editable

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2020-09-04
@RusRatibor

(не )?доступен

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question