dakkardaemor
Programmer
Hi all!
I've a little question ;-)
I must create a regexp that matches only:
true|false|0|1
so I tryed with this one:
0|1|true|false
it seems to work well, but it matches also with:
truex falsehood and so on..
so I tried this one:
^(0|1|true|false)$
but this one doesn't seems to work as I supposed, it doesn't match with
true
for example :_(
I tried also:
^0|1|true|false$
but this one doesn't work as my first attempt...
In conclusion:
I think that
^(0|1|true|false)$
must be the solution, but I don't know why it doesn't work.
Please help!
Thank you in advance!
Dakkar
I've a little question ;-)
I must create a regexp that matches only:
true|false|0|1
so I tryed with this one:
0|1|true|false
it seems to work well, but it matches also with:
truex falsehood and so on..
so I tried this one:
^(0|1|true|false)$
but this one doesn't seems to work as I supposed, it doesn't match with
true
for example :_(
I tried also:
^0|1|true|false$
but this one doesn't work as my first attempt...
In conclusion:
I think that
^(0|1|true|false)$
must be the solution, but I don't know why it doesn't work.
Please help!
Thank you in advance!
Dakkar