[TxMt] Conditional regex

Dijk van Marc marcvdijk at gmail.com
Fri May 22 17:56:09 UTC 2009


Hello all,

I'm developing a bundle for handling biomolecular structure files (PDB  
files). I'm now working on
getting the language description sorted out. In doing this I ran into  
a regex problem.

The situation:
A PDB file is essentially a table. One line from such a table can be  
as follows:

ATOM     14  CA  GLN A   2     -27.648  -9.581  30.325  1.00 10.00

In the language description I would like to use a regular expression  
construct that
matched 'GLN' only if the line starts with either 'ATOM' or 'HETATM'.  
This seams like
a conditional regular expression but my attempts to implement it at  
such have failed
so far.

Can anyone help?

Thanks,
Marc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20090522/3737d8c3/attachment.html>


More information about the textmate mailing list