From ddfe0044ce13f5a0b3d3d3eca1319530e8bc60aa Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 13 Feb 2014 14:16:39 +0100 Subject: pdf-util.js: Fix some regexps. --- source/pdf/js/pdf-util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/pdf/js/pdf-util.js b/source/pdf/js/pdf-util.js index 359563e1..dd7aa09c 100644 --- a/source/pdf/js/pdf-util.js +++ b/source/pdf/js/pdf-util.js @@ -122,10 +122,10 @@ util.printx = function(fmt, val) break; case 'A': - m = val.match(/[A-z]/); + m = val.match(/[A-Za-z]/); if (!m) return res; res += MuPDF.convertCase(m[0],cs); - val = val.replace(/^[^A-z]*[A-z]/,''); + val = val.replace(/^[^A-Za-z]*[A-Za-z]/,''); break; case '9': @@ -563,7 +563,7 @@ function AFSpecial_KeystrokeEx(fmt) break; case 'A': - m = val.match(/^[A-z]/); + m = val.match(/^[A-Za-z]/); if (!m) { event.rc = false; @@ -693,7 +693,7 @@ function AFNumber_Keystroke(nDec, sepStyle, negStyle, currStyle, strCurrency, bC event.rc = false; if (!event.rc) - app.alert("The value entered does not match the format of the field [ "+event.target.name+" ]"); + app.alert("The value entered ("+event.value+") does not match the format of the field ["+event.target.name+"]"); } } -- cgit v1.2.3