java - Difference Between '+' and '*' operation pattern in REGEXP -
i have table candidate in db running under mysql 5.5 , trying rows table xy contains in firstname, can run below 2 queries
select firstname candidate firstname regexp '^xy.+'; select firstname candidate firstname regexp '^xy.*'; i getting same result want differences in these 2 regexp.
+ causes resulting re match 1 or more repetitions of preceding re. ab+ match ‘a’ followed non-zero number of ‘b’s; not match ‘a’.
* causes resulting re match 0 or more repetitions of preceding re, many repetitions possible. ab* match ‘a’, ‘ab’, or ‘a’ followed number of ‘b’s.
Comments
Post a Comment