Learn English – “part of” vs. “the part of”

articlesword-usage

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"?

Best Answer

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.

Related Topic