I am creating my own file tagging system for an application and have not found any relevant information on the subject.
My application appends tags to the end of a specified file, like so:
If the user wants to mark a particular file as private (for example), the following text will be appended to the end of the specified file:
$/private*
Now, I'm trying to figure out how I would extract those tags, and separate them when the file is loaded into my application:
For example, if the file has 3 tags, named "Private", "bad", "jokes". Then I want my application to get those tags and display them like so:
This file is marked as private, and contains bad jokes.
OR - Another way to show them would be:
This file has the following tags: Private Bad Jokes
you can put markers for marking beginning of tags and separate tags from each other:
main text of the file.......................
+++$$$+++private|bad|jokes+++$$$+++
then you can load the text of file and extract the tags based on the sentinels setup by you.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.