P
Peter Afonin
Hello,
I need to parse a string that returns the domain DNS records and to put this
data into a DataTable. I don't have much experience in parsing strings, so
I'm not aware of the efficient way how to do this. I've found some examples
of CSV parser classes, but not sure how to use them in my case.
Here is an example of the string:
RRs\nsubname: @;priority: 5;address: mail.domainname.net.;rectype:
MX;\nsubname: dns;priority: 1;address: ns1.domainhost.net.;rectype:
NS;\nsubname: dns;priority: 2;address: ns2.domainhost.net.;rectype:
NS;\nsubname: help;priority: 0;address: 67.22.36.4;rectype: A;\nsubname:
mail;priority: 0;address: domainname.net.;rectype: CNAME;\nsubname:
support;priority: 0;address: help.domainhost.net.;rectype: CNAME;\nsubname:
text;priority: 0;address: \"tex value\";rectype: TXT;
Each record is separated by "\n". The columns are:
subname
rectype
priority
address
I would appreciate very much if you could point me to the right direction
how to parse this string efficiently.
Thank you,
Peter
I need to parse a string that returns the domain DNS records and to put this
data into a DataTable. I don't have much experience in parsing strings, so
I'm not aware of the efficient way how to do this. I've found some examples
of CSV parser classes, but not sure how to use them in my case.
Here is an example of the string:
RRs\nsubname: @;priority: 5;address: mail.domainname.net.;rectype:
MX;\nsubname: dns;priority: 1;address: ns1.domainhost.net.;rectype:
NS;\nsubname: dns;priority: 2;address: ns2.domainhost.net.;rectype:
NS;\nsubname: help;priority: 0;address: 67.22.36.4;rectype: A;\nsubname:
mail;priority: 0;address: domainname.net.;rectype: CNAME;\nsubname:
support;priority: 0;address: help.domainhost.net.;rectype: CNAME;\nsubname:
text;priority: 0;address: \"tex value\";rectype: TXT;
Each record is separated by "\n". The columns are:
subname
rectype
priority
address
I would appreciate very much if you could point me to the right direction
how to parse this string efficiently.
Thank you,
Peter