Shortcode detecting with Regular Expression

Hi guys,

how can i detect a Shortcode like an link or an anchor with a Regular Expression?

many thanks :slight_smile:

What exactly do you want to know? How to replace these tags? The pattern for the regular expression? What is your use case?

If is is about replacing these tags, you can do that in a kirbytag hook-https://getkirby.com/docs/reference/plugins/hooks/kirbytext-before

I would like to know the pattern for the regular expression :slight_smile: because I made a function that automatically links many words and the shortcodes are not allowed to be linked

https://regex101.com could become your friend.