Updated for release 4.28

This commit is contained in:
Giancarlo Panichi 2021-02-01 16:03:52 +01:00
parent 7b2af44b43
commit 9456af2cf4
2 changed files with 26 additions and 26 deletions

View File

@ -45,18 +45,18 @@ public class Sha1 {
// Bug
//
RE regex = new RE("[a-z]");
for (int i = 0; i < len; i++) {
String chars = "" + filestring.charAt(i);
boolean optioned = regex.match(chars);
// Fix
// Pattern p = Pattern.compile("[a-z]");
//
// RE regex = new RE("[a-z]");
// for (int i = 0; i < len; i++) {
// String chars = "" + filestring.charAt(i);
// Matcher m = p.matcher(chars);
// boolean optioned = m.matches();
// boolean optioned = regex.match(chars);
// Fix
Pattern p = Pattern.compile("[a-z]");
for (int i = 0; i < len; i++) {
String chars = "" + filestring.charAt(i);
Matcher m = p.matcher(chars);
boolean optioned = m.matches();
if (optioned) {
counter++;

View File

@ -219,25 +219,25 @@ public class Transformations {
//Bug RE
//
RE regexp = new RE("[^\\\\]\"");
boolean matching = regexp.match(phrase);
//RE regexp = new RE("[^\\\\]\"");
//boolean matching = regexp.match(phrase);
if (matching) {
int i0 = regexp.getParenStart(0);
quoted = phrase.substring(0, i0 + 1).trim();
phrase = phrase.substring(i0 + 2).trim();
}
//Fix
//Pattern p = Pattern.compile("[^\\\\]\"");
//Matcher m = p.matcher(phrase);
//boolean matching = m.matches();
//
//if (matching) {
// int i0 = m.start();
// int i0 = regexp.getParenStart(0);
// quoted = phrase.substring(0, i0 + 1).trim();
// phrase = phrase.substring(i0 + 2).trim();
//}
//Fix
Pattern p = Pattern.compile("[^\\\\]\"");
Matcher m = p.matcher(phrase);
boolean matching = m.matches();
if (matching) {
int i0 = m.start();
quoted = phrase.substring(0, i0 + 1).trim();
phrase = phrase.substring(i0 + 2).trim();
}
}
if (phrase.startsWith(delimiter))