-1

I have this reggae (0+1)* and it is said that this is array of 0 and 1. * means "zero or more".

My question is what is exactly 0+1? Is it 01010101010 or random 0 and 1?

user3100193
  • 461
  • 3
  • 6
  • 15

1 Answers1

1

This regex means that you can zero or more occurrences of group 0+1.

And group 0+1 means: one or more occurrences of 0 followed by 1.

Examples:

  • 00000101001
  • 01010101
  • empty string

etc.

sloth
  • 91,747
  • 17
  • 156
  • 204
Taras Velykyy
  • 1,681
  • 1
  • 16
  • 28