Hello everyone,
I have come across a fixed formatted file that I need to parse in python. An example of the file would be something like this:
"user" "jdoe" = {
"mail" "\"john.doe@something.com\""
"displayname" "\"John Doe\""
}
"user" "crock" = {
"mail" "\"chris.rock@something.com\""
"displayname" "\"Chris Rock\""
}
The idea is that I could get the user name and the attributes assigned to variables for further processing. I was hoping that I could get some pointers to nudge me in the right direction. Right now I am thinking about regular expressions, but I don't know if that is the right direction or not. Has anyone else ever done something like this before?
Thanks in advance
I have come across a fixed formatted file that I need to parse in python. An example of the file would be something like this:
"user" "jdoe" = {
"mail" "\"john.doe@something.com\""
"displayname" "\"John Doe\""
}
"user" "crock" = {
"mail" "\"chris.rock@something.com\""
"displayname" "\"Chris Rock\""
}
The idea is that I could get the user name and the attributes assigned to variables for further processing. I was hoping that I could get some pointers to nudge me in the right direction. Right now I am thinking about regular expressions, but I don't know if that is the right direction or not. Has anyone else ever done something like this before?
Thanks in advance