Hi I have a long line of text that I want to parse for name/value pairs
see example below
( note:
- it is a one long line so please remove linebreaks, and
- I have replaced tabs with the pipe for clarity)
I am trying to regex to extract the name/value pairs; perhaps I could just
use a split function (this just occured to me as I pasted the example below.
Nevertheless, can i use RegEx to extract name value pairs?
the pattern i am came up with (whch I bet could be improved) is
Patrn1 = ""
Patrn1 = Patrn1 & "\t*([\w]+)\t([\w \/\x22]+)\t*" ' first value pair
Patrn1 = Patrn1 & "\{\t*(Alignment)\t([\w \x22]+)" 'second value pair to
account for the bracket; I suppose I could replace it with nothing
Patrn1 = Patrn1 & "(\t*([\w]+)\t([\w \x22]+))+" 'third value pair, which
should repeat but does not...
thanks in advance for your assistance.
Regards
Habib
------------------------------
||||ReportCalculatedField|"328"||||||||{|||||Alignment|"right"|||||BackColor|"Transparent"|||||CalculatedField|"Apply
Bucket
1"|||||DisplayOptions|"HideWhenEmpty"|||||DisplayType|"Data"|||||Font|"Helvetica
(generic)"|||||FontBold|"false"|||||FontColor|"Black"|||||FontItalic|"false"|||||FontSize|"7"|||||FontUnderline|"false"|||||Format|""|||||FormatField|"'Func/Rept
Index'"|||||Pattern|"(none)"|||||PatternColor|"White"|||||PositionLeft|"365"|||||PositionTop|"256"|||||ReadingOrder|"LeftToRight"|||||SizeHeight|"8"|||||SizeWidth|"72"|||||ZOrder|"116"||||}
------------------------------
--
www.DynExtra.com
A resource for the Microsoft Dynamics Community
Featuring FAQs, File Exchange and more
Current member count: 21
--------------------------------------------
Share your knowledge. Add your favorite questions and answers
Help add questions to this site! We want Your input.