help with reg expression

I am trying to write a reg expression with the following rules:
Must start with a lower case letter, can have any characters in between EXCEPT NUMBERS, must end with a lower case letter

the expression I came up with is the following:

[a-z]+([^0-9]*?)[a-z]+

the problem is that “section9” will yeild “section”, and “se-ction9” will yeild “se-ction”. But “se1ction9” will break it down into 2 mathces, “se” and “ction”. How can I change my expression so that “se1ction9” is rejected completely?

I don’t think you need the ‘?’ in your example.

I always use this site http://www.regular-expressions.info/tutorial.html as a reference when I’m trying to grok regular expressions.

I think you just need to add beginning of line and end of line markers to what you have

^[a-z]+([^0-9]*?)[a-z]+$

http://www.regular-expressions.info/anchors.html

see also http://www.regular-expressions.info/wordboundaries.html if you are matching this inside a longer string.