Skip to content

Commit

Permalink
Use string slicing instead of regex to parse PDB header lines (Bug 2948)
Browse files Browse the repository at this point in the history
  • Loading branch information
crosvera authored and etal committed May 29, 2010
1 parent 77e0ee3 commit cc9da03
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Bio/PDB/parse_pdb_header.py
Expand Up @@ -152,8 +152,10 @@ def _parse_pdb_header_list(header):

for hh in header:
h=re.sub("[\s\n\r]*\Z","",hh) # chop linebreaks off
key=re.sub("\s.+\s*","",h)
tail=re.sub("\A\w+\s+\d*\s*","",h)
#key=re.sub("\s.+\s*","",h)
key = h[:6].strip()
#tail=re.sub("\A\w+\s+\d*\s*","",h)
tail = h[10:].strip()
# print key+":"+tail

# From here, all the keys from the header are being parsed
Expand Down

0 comments on commit cc9da03

Please sign in to comment.