git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge commit 'alpha/update_2_12_for_2_11_2_series_merge^2' into HEAD
[jalview.git]
/
src
/
jalview
/
util
/
DBRefUtils.java
diff --git
a/src/jalview/util/DBRefUtils.java
b/src/jalview/util/DBRefUtils.java
index
bcb0bd3
..
671142b
100755
(executable)
--- a/
src/jalview/util/DBRefUtils.java
+++ b/
src/jalview/util/DBRefUtils.java
@@
-309,6
+309,15
@@
public class DBRefUtils
};
};
+ private static Regex PARSE_REGEX;
+
+ private static Regex getParseRegex()
+ {
+ return (PARSE_REGEX == null ? PARSE_REGEX = Platform.newRegex(
+ "([0-9][0-9A-Za-z]{3})\\s*(.?)\\s*;\\s*([0-9]+)-([0-9]+)")
+ : PARSE_REGEX);
+ }
+
/**
* Parses a DBRefEntry and adds it to the sequence, also a PDBEntry if the
* database is PDB.
/**
* Parses a DBRefEntry and adds it to the sequence, also a PDBEntry if the
* database is PDB.
@@
-336,8
+345,7
@@
public class DBRefUtils
* Check for PFAM style stockhom PDB accession id citation e.g.
* "1WRI A; 7-80;"
*/
* Check for PFAM style stockhom PDB accession id citation e.g.
* "1WRI A; 7-80;"
*/
- Regex r = new com.stevesoft.pat.Regex(
- "([0-9][0-9A-Za-z]{3})\\s*(.?)\\s*;\\s*([0-9]+)-([0-9]+)");
+ Regex r = getParseRegex();
if (r.search(acn.trim()))
{
String pdbid = r.stringMatched(1);
if (r.search(acn.trim()))
{
String pdbid = r.stringMatched(1);