If my step-definition looks like below :

```
When(/^ I validate current date|time having input (.*)$/, function(time)){
console.log('time value is :' + time)
}

```

In my actual `scenario`, i would be calling the above `step-definition` as shown below :

`When I validate current date having input "bla bla"`

**Problem** : When my scenario executes the actual step-definition, it should print `time is : bla bla` (since `console.log` exists in the `step-definition`. But it is giving me `undefined`.

If i change the scenario to look like below(i.e, without `|` symbol), it would print the value that I am sending from my scenario.
i.e,

```
When(/^ I validate current date having input (.*)$/, function(time)){
console.log('time value is :' + time)
}

```

This time it prints the value. I am interested to know why is it breaking when `step-definition` has `|` symbol having input parameter.Any help would be appreciated.

**Note** : I can resolve the issue by writing 2 `step-definitions`(i.e, one having date & the other one having time). But in-terms of coding practise, it's kind of duplicate(redundancy) that does the same job.