I wrote:

One of these functions is RegEx. It takes a string and a regular expression as input and returns part of the string that matches a pattern specified in parentheses in the regular expression.

I know "part of something" means *some, but not all". However, a specific part of something is countable. I don't know here, I should use "a/the part of string" or simply "part of the string"?

  • 2
    the part ... that matches or those parts that match or any substring matching|that matches
    – TimR
    Commented Oct 18, 2016 at 11:25

2 Answers 2


A part of something literally means that it is just one part in a bigger aggregate structure among all other parts in that structure. The head is a part of the human body. It is one part out of many other parts that constitute the human body.

When something is part of something else (no article), it means that that something belongs to that something else or is found there. Since I'm a very peaceful person, violence is not part of what I am.

To sum up what I have just said, I think of a part of something as being physical and part of something as something more abstract, but in your case, you would probably be better off using the part of because the part that we are talking about is identified by additional information provided further down in the sentence.


I think the decision about which to use depends on uniqueness.

If there is only 1 possible part of the string which the function can return, then use the

If there are many possible parts, but it just returns one, use a.

  • how about "part of ..." without any article
    – Ahmad
    Commented Oct 18, 2016 at 9:26
  • I think that's fine too. Although presumably the function is returning something unique? In which case I'd say it's better to use "the", because without any article it sounds more like it is not unique.
    – Tom B
    Commented Oct 18, 2016 at 9:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .