regex doubts

Mr SZ sk8in_zombi at yahoo.com.au
Fri Jul 18 06:05:20 EDT 2008


Hi,

I am taking a string as an input from the user and it should only contain the chars:L , M or R

I tried the folllowing in kodos but they are still not perfect:

[^A-K,^N-Q,^S-Z,^0-9]
[L][M][R]
[LRM]?L?[LRM]? etc but they do not exactly meet what I need.

For eg: LRLRLRLRLM is ok but LRLRLRNL is not as it has 'N' .like that.

regards,
SZ

The string may or may not have all the three chars.


" life isn't heavy enough,it flies away and floats far above action"


      Start at the new Yahoo!7 for a better online experience. www.yahoo7.com.au
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080718/30007bcc/attachment.html>


More information about the Python-list mailing list