X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fcom%2Fstevesoft%2Fpat%2FRegex.java;fp=src%2Fcom%2Fstevesoft%2Fpat%2FRegex.java;h=fea3d07f77ad7f0ad39a9749db56874cebf123f5;hb=5e20c0116864d77705d951e35c41a13197791156;hp=6d07427645a62a04efebc4b350d137be946f50da;hpb=1bad3c3f74b2e204e0d7ba93a745f5ec775c8a3e;p=jalview.git diff --git a/src/com/stevesoft/pat/Regex.java b/src/com/stevesoft/pat/Regex.java index 6d07427..fea3d07 100755 --- a/src/com/stevesoft/pat/Regex.java +++ b/src/com/stevesoft/pat/Regex.java @@ -87,7 +87,8 @@ class NUnicodeW extends UniValidator return -1; } char c = s.charAt(from); - return !(Prop.isAlphabetic(c) || Prop.isDecimalDigit(c) || c == '_') ? to + return !(Prop.isAlphabetic(c) || Prop.isDecimalDigit(c) || c == '_') + ? to : -1; } } @@ -282,8 +283,8 @@ class UnicodeLower extends UniValidator * small differences as well. I will either make my package conform or note them * as I become aware of them. *
- * This package supports additional patterns not in perl5:
(?@()) | *Group | @@ -298,7 +299,8 @@ class UnicodeLower extends UniValidator * beginning of the string. "x(?<1)" is equivalent to "(?=x)". The number, 1 * in this example, is the number of characters to move backwards. *
* This method will attempt to rewrite your pattern in a way that makes it - * faster (not all patterns execute at the same speed). In general, - * "(?: ... )" will be faster than "( ... )" so if you don't need the - * backreference, you should group using the former pattern. + * faster (not all patterns execute at the same speed). In general, "(?: ... + * )" will be faster than "( ... )" so if you don't need the backreference, + * you should group using the former pattern. *
* It will also introduce new pattern elements that you can't get to * otherwise, for example if you have a large table of strings, i.e. the @@ -2061,10 +2057,9 @@ public class Regex extends RegRes implements FilenameFilter boolean isHexDigit(StrPos sp) { - boolean r = !sp.eos - && !sp.dontMatch - && ((sp.c >= '0' && sp.c <= '9') - || (sp.c >= 'a' && sp.c <= 'f') || (sp.c >= 'A' && sp.c <= 'F')); + boolean r = !sp.eos && !sp.dontMatch + && ((sp.c >= '0' && sp.c <= '9') || (sp.c >= 'a' && sp.c <= 'f') + || (sp.c >= 'A' && sp.c <= 'F')); return r; }