Hi Folks.

I didn't come up with this method, I'm just the one who has to deal with it. :-)

The year is represented most of the time in this format:

(2000)

This regular expression in preg_match to extract it has been working fine:
        preg_match('/\((19|20)[0-9][0-9]\)/',$line,$found);

However, other times it is represented with Roman Numeral version control when there is more than one version:

(2000/I)
or
(2000/II)

So far it looks like the version control goes out to three Roman Numbers. Like I said, I didn't come up with this.

It would be just peachy if some kind person here could show me an elegant way to handle this in PHP (as a regular expression?) which might be, for example, either (2000) or (2000/V). Thanks in advance!

David Roth


_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Reply via email to