A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

March 9, 2010

Regular expressions

Hi,

Can anyone please tell me how many below lines will match for the pattern /a*bc[e-g]*[0-9]*/.

1.aaaaabcfgh19919234
2.bc
3.abcefg123456789
4.abc45
5.aabcggg87310

If it is matching all the lines then could you please explain me how it is matching lines 2 and 4.

Thanks in advance.

Regards
Ravi.K

Click Here!