Please how can i parse meta data like link, license name short etc if the input data is exactly like this using regex(please the single quote and @ is included)
i tried this code
but its not working properly i think my regex is wrong. Any suggestions?
B4X:
'@Link: http://test.com/hello/mylib
'@license name short: DBAD
'@license link: http://dbad.com
i tried this code
B4X:
'Allows parsing header like: '@link: http://punchlinetech.com
Private Sub ParseProjectDocAttributes(Attribute As String) As String
Dim HeaderMatcher As Matcher
Dim HeaderMatcherData As String
HeaderMatcher = Regex.Matcher("(?i)(?:'@" & Attribute & ")(?-i):(?:.*)", ProjectFileTextData)
If HeaderMatcher.Find Then
HeaderMatcherData = HeaderMatcher.Match
HeaderMatcherData = HeaderMatcherData.SubString(HeaderMatcherData.IndexOf(":") + 1)
HeaderMatcherData = HeaderMatcherData.Trim
End If
Return HeaderMatcherData
End Sub
but its not working properly i think my regex is wrong. Any suggestions?