I think the main issue is visible here:
"...I am only 15 so my knowledge is low..."
I want to start by encouraging you to continue with what you're doing. I was a young programmer once and I remember struggling with basic concepts, trying to make big things happen with my very small "toolset" of knowledge. There's a LOT to learn, too much for a lifetime of study. But you will progress, you will get better and better and the things that you struggle with today will be easy in a little while.
However, this site was explicitly designed for "professional and enthusiast programmers". The purpose is not to answer any one person's question (that would be a forum), but to create a collection of questions and answers that will be helpful and useful to other programmers in the future. Look at the downvote description:
That's a list of "OR" statements - meeting just one of those criteria makes a post eligible for a downvote. The "not useful" part is probably what played into the downvotes the most, especially given that this is a regex question (a topic much more frequently abused then others). Reading your question, as a professional, I see no real value in it for other programmers. It's been answered many, many times already in many different forms, though finding an exact duplicate would be basically impossible because the requirements are so narrow.
Stack Overflow is very much like an advanced philosophy site. Questions about things that have been around for a long time and about topics that have been discussed at length are not very useful, and thus may attract downvotes for that reason and that reason only. After a while, even philosophy teachers get tired of answering "What if I'm just a brain in a jar?"-type questions, and many users on this site have gotten tired of answering "How can I fine-tune this regex to do what other technologies are better at doing, the result of which will be useful to no one but me."
Simple questions are absolutely permitted, because the art is constantly changing under our feet and even professionals need to ask a basic question every now and then. Had yours been one of the first questions about regexes, it probably would have been well received. But it wasn't.
I think you may find an answer to a similar question helpful:
https://meta.stackexchange.com/a/180715/191410
But don't let any of this dissuade you from asking questions on Stack Overflow!
There is no way to learn except by experience, and the experience you are gaining is extremely valuable. Now that you know other technologies exist for accomplishing your goal, you have become a better programmer and the world is just a little bit better for that. I think that's worth a few downvotes, don't you?
specific-question
tag.specific-question
.