VMD-L Mailing List
From: Θωμας Ευαγγελιδης (te8624_at_mbg.duth.gr)
Date: Tue Sep 04 2007 - 06:13:56 CDT
- Next message: Gianluca Santarossa: "advanced python console"
- Previous message: Vito Ashley: "Your Zoc0r 0rder #46390"
- Next in thread: Axel Kohlmeyer: "Re: regular expression in Tcl"
- Reply: Axel Kohlmeyer: "Re: regular expression in Tcl"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
I need to write a regexp in Tcl to implement a grep command that will match
exactly a line of a pdb file. Specifically, given a resid "13", a segname "SOD"
and a type "ION", I need to get this line from the pdb:
ATOM 6856 SOD SOD I 10 15.803 8.833 -20.385 1.00 0.00 ION
In perl I would write the following regexp:
"^ATOM\ *[0-9]*\ *SOD\ *.*10\ *[\-\.0-9]*\ **[\-\.0-9]*\ **[\-\.0-9]*\
**[\-\.0-9]*\ **[\-\.0-9]*\ *ION\ \ \ $"
But in Tcl I get an error for each of the following "[0-9]", "*[\-\.0-9]*",
"\ *".
Can anybody propose a accurate regexp in Tcl please?
Thanks,
Thomas Evangelidis
- Next message: Gianluca Santarossa: "advanced python console"
- Previous message: Vito Ashley: "Your Zoc0r 0rder #46390"
- Next in thread: Axel Kohlmeyer: "Re: regular expression in Tcl"
- Reply: Axel Kohlmeyer: "Re: regular expression in Tcl"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]