According to the docs, you should be able to simply use get_shortcode_regex(array('my_shortcode')) and save yourself the trouble of comparing the $matches
– keroSep 11 '18 at 5:43

@kero Thank you.. but I can get the used params on $matches[3] with that approach.
– 5ervantSep 11 '18 at 6:06

Yeah, but your regex is really expensive if you check for all shortcodes. preg_match_all() might take a long time to execute, so using a simpler regex will probably make it alot faster
– keroSep 11 '18 at 6:22

WordPress has a function, has_shortcode() which can be used for checking if a shortcode exists.
– Jacob PeattieSep 11 '18 at 6:39