Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Due to so much less examples of regular expression on internet.. i have lots of confusion in regular expression.

[ab] what is the meaning of it in regular expression

it it a,b or its like a,b,aa,bb,aaa,bbb............
and

[0-9] is it like 0,1,2,3,4,5,6,7,8,9 only ?? or 0,1,2,3,4,5,6,7,8,9 ,10,11,12....

and what is the meaning of ^ and $ in regular expression??
Posted
Comments
Sergey Alexandrovich Kryukov 4-Jul-12 15:52pm    
Due to what?! To so much less examples? You must be joking... :-)
--SA

1 solution

your confusion are for sure. let me try to remove your confusion.

[..] :- it means it has explicit set of character to match.
^ :- it means start of string.
$ :- it means end of string.
there are more like--
\ :- preceding one of the above or down.
. :- any character except new line(\n).
| :- alternation.
 
Share this answer
 
v2
Comments
codegeekalpha 4-Jul-12 14:29pm    
can u give me some examples??
Sandeep Mewara 4-Jul-12 14:57pm    
Find as many you want here: http://www.google.co.in/search?q=regular+expression+examples&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
Sergey Alexandrovich Kryukov 4-Jul-12 15:53pm    
My 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900