Discussion List Archives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Fine-tuning CIF dictionary regexes

John Bollinger wrote:

> For your particular case, it seems that you ought to be able to read a
> regex from the dictionary, prepend a '^', append a '$',  and go.
> Alternatively, some regex engines (e.g. Java's) allow you to exert
> control at the API level over whether or not the whole string, the
> beginning of the string, or just any old part of the string needs to
> match.

A single appended $ did the trick, of course, why didn't I think of
that?  

So if the non-universal regular expressions in the dictionary (those
that contain alternations) finished with a $ sign, that would guarantee
(almost?) all regexp engines could match using the expressions in the
dictionary, with no program intervention - worth thinking about.  

_______________________________________________
cif-developers mailing list
cif-developers@iucr.org
http://scripts.iucr.org/mailman/listinfo/cif-developers

Reply to: [list | sender only]
International Union of Crystallography

Scientific Union Member of the International Council for Science (admitted 1947). Member of CODATA, the ICSU Committee on Data. Member of ICSTI, the International Council for Scientific and Technical Information. Partner with UNESCO, the United Nations Educational, Scientific and Cultural Organization in the International Year of Crystallography 2014.

ICSU Scientific Freedom Policy

The IUCr observes the basic policy of non-discrimination and affirms the right and freedom of scientists to associate in international scientific activity without regard to such factors as ethnic origin, religion, citizenship, language, political stance, gender, sex or age, in accordance with the Statutes of the International Council for Science.