Which regex use kirby for the fieldname in the contentfiles

which Regex use Kirby to determine the fieldname in the content .txt files?
I have an small project which is not using Kirby. I use there also a txt file for the sitecontent but I have a problem to get my regex properly work. I test for the double points after the fieldname. But I get a problem if I have a double point inside my normal text.
This is my regex actually: ~(?!:/|:\+)(:|: )~
Maybe does someone know how Kirby get this work?


Have a look at the constructor in /kirby/core/content.php from line #27. Kirby uses regex to split the fields by the dashes that separate each fields, then gets the position of the first colon for each item.

Thank you for your answer with the file! This was I searched for.

And I have no problems with that you set my threads to solved, but please could you wait until a reaction on your answer. You can not assume that all your answers will solve the problem.

Sorry @JanStieler, very often people don’t mark their threads as solved and I only do this sort of “prematurely” when I’m pretty sure that my reply answers a question, and it also helps me to keep track of things. However, you can always change the status yourself again if you are not happy with an answer. :peace_symbol:

Okay Sonja. I’m also a Moderator in an forum and I know the problem with the solve tagging, also I can comprehend your reasons. I just wanted to address this to you because it bugged me a little bit. Also :peace_symbol: :smiley: .