Open NTT1906 opened 2 years ago
For all unicode
^\s*([^\r\n:]+)[ \t]*:([^\r\n#]+)([#\w\t ]*)
https://3v4l.org/mTPP3 This but the return is silly
This?
^\s*(\w+)\s*:.[^#]*\s*([\w\t ]*[^\r\n]*)
mine : carft j ### i漢字 H爨底下貔貅
tv: "tee" # HI
tvw: 9 #haha
9abaa: ahah #Hihia
#me
^\s*((\w+)\s*:.[^\r\n#]*([^\r\n]*#*)?)?(#[^\r\n]*)*
mine : carft j ### i漢字 H爨
#底下貔貅
tv: "tee" # HI
tvw: 9 #haha
ah: shs
9abaa: ahah
#me
;-;
https://3v4l.org/bRorV Like these results, we will use the 2, 3, 4 as those are the key, inline comment and next key doc.
This may have some more errors such as multilined doc? etc
checked and that won't be a problem :'D
https://3v4l.org/bRorV Like these results, we will use the 2, 3, 4 as those are the key, inline comment and next key doc.
This may have some more errors such as multilined doc? etc
checked and that won't be a problem :'D
https://3v4l.org/bRorV Like these results, we will use the 2, 3, 4 as those are the key, inline comment and next key doc. This may have some more errors such as multilined doc? etc
multilined doc with line between them won't connect...
^\s*(?:(\w+)\s*:.[^\r\n#]*([^\r\n]*#*)?)?(#[^\r\n]*)*
https://3v4l.org/bRorV Like these results, we will use the 2, 3, 4 as those are the key, inline comment and next key doc.
This may have some more errors such as multilined doc? etc
This will use 1,2,3
^\s*(?:(\w+)\s*:.[^\r\n#]*([^\r\n]*#*)?)?(#[^\r\n]*)*
https://3v4l.org/bRorV Like these results, we will use the 2, 3, 4 as those are the key, inline comment and next key doc. This may have some more errors such as multilined doc? etc
This will use 1,2,3
^\s*(?:(\w+)\s*:.[^\r\n#]*([^\r\n]*#*)?)?(#*(?:[^\r\n]|[\r\n]#)*)
This worked, however it still needs to refine the matches so that they don't split apart the documents. Another issue is the array dash, which I still don't know how to deal with... (Another capture group?):c
This currently only parse for YAML 1.1 and not supporting that dash thingy
Maybe I should split out the string by PHP then use smaller regex patterns for dealing with comments?
i gave up :c
UTF-8?