-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
  • 531
  • 4
  • 6
  • 16

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
  • 99,095
  • 21
  • 171
  • 219
Taras Velykyy
  • 1,781
  • 1
  • 16
  • 30