From: David Masover Date: 2009-12-01T11:55:41+09:00 Subject: Re: one more regular expression, please On Monday 30 November 2009 08:07:26 pm J. mp wrote: > I have the follwow string > > ++((100))++askjasdjksjdkasdkjk++((200))++skdjsjd > > I need a reg expression that extracts only the first number inside the > first ++(( ))++ and ignore the rest..., in this case I need to return > 100 Since I can't figure out why you'd ever want to do that in a real app, I have to ask: Is this a homework assignment? Well, I'd rather not assume, so I'll give you a partial answer: Regular expressions don't return things, they match things. You can't write a regular expression (that I know of) which will match only what you're asking for, unless you assume things about that specific string. Especially in homework, assuming things like that is a Bad Idea. There is a solution, and it includes regular expressions, but they are not the whole story.