I'm trying to build a regular expression that allows me to accept X amount of characters but at the same time they are optional.
At the moment what I have is this.
^x_PREFIJO-[0]+CODIGO-
Which validates me inputs like:x_PREFIJO-00CODIGO-blah-blah-blah
But it doesn't allow me:x_PREFIJO-CODIGO-blah-blah-blah
I've tried ^x_PREFIJO-[[0]+]?CODIGO-
, ^x_PREFIJO-[0]+?CODIGO-
and some similar ones, but I don't know how to wrap the del part [0]+
to make it optional.
what you want is
The * means 0 times or more.