[TxMt] Re: Conditional regex
sking at arbor.net
Fri May 22 18:20:13 UTC 2009
Dijk van Marc wrote:
> 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?
Is this what you mean?
This will match any line which starts with either 'ATOM' or 'HETATM',
followed by any string of arbitrary characters, followed by the string
Sr. Software Engineer
+1 734 821 1461
More information about the textmate