Jump to content


Photo

Parsing with PHP


  • Please log in to reply
2 replies to this topic

#1 davidoff

davidoff
  • Members
  • Pip
  • Newbie
  • 6 posts

Posted 23 October 2006 - 06:14 PM

I'd like to parse a text file based on the GEDCOM format, which is a text document similar to the ICAL format. It is not XML based.

Can anyone recommend a parsing library where you can parse 'any' language ?

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 23 October 2006 - 06:22 PM

How about this?
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 davidoff

davidoff
  • Members
  • Pip
  • Newbie
  • 6 posts

Posted 12 November 2006 - 09:38 PM

I would like to write my own code to parse the data.

I have found this http://hudzilla.org/php/21_5_3.php tutorial on parsing your own language which may be useful but I don't know if it would be simpler to just loop through each line and make decisions based on what is present.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users