understand a regular expression

  • Thread starter Thread starter Alb
  • Start date Start date
A

Alb

Hi,
I'am trying to understand a regular expression.
It is:
^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$

I'am watching at the first "think". It start with ^ and
its closed with $.
It allow the insertion of a character included in [1-9]
(with the ends values included).
But I really do not understand what does {1} means.
Somebody could help me?
Thanks!
 
Thank you very much, now I have a clear view of that
expression!
Thanks.
-----Original Message-----
{1} specifies exactly one match of ^[1-9]

Tu-Thach
-----Original Message-----
Hi,
I'am trying to understand a regular expression.
It is:
^[1-9]{1}$|^[1-4]{1}[0-9]{1}$|^50$

I'am watching at the first "think". It start with ^ and
its closed with $.
It allow the insertion of a character included in [1-9]
(with the ends values included).
But I really do not understand what does {1} means.
Somebody could help me?
Thanks!

.
.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top