i tried using [A-Z]+ it'll work on a single word ex: BRENTWOOD but if i put in BRENTWOOD MS its incorrect. any ideas???
Question
Question
Answer
If you want the regular expression to match multiple words, you'll also need to include the space in between the words as an allowed character: [A-Z ]+
If you want to allow any whitespace character (e.g., tab or newline), not just spaces, you add \s to the allow characters: [A-Z\s]+
Replies
I use the website regex101.com for a quick reference to answering questions like this, and it speeds up the process of testing your expression instead of trying to do it through the LF UI. You can copy and paste your sample text to that site, and see the results of your regex work on the fly.
Once I get everything working the way I like, I copy my completed expression from there back into Laserfiche. When dealing with large blocks of text from doing OCR on an entire page it's a huge time saver.
That regex will match upper case letters, but it doesn't match whitespace (space, tabs, line breaks, etc). Try [A-Z\s]+ and see if that works in your particular case. The \s tells it to look for white space characters.
[A-Z\s]+ worked. thanks you guys!
regular expressions cant be used on number fields?
Please feel free to ask this question in another thread. Asking a new question instead of putting it in the comments makes it more visible to the people that are answering questions, and makes it easier for others with the same question to find it later!
Please also take the time to mark whichever answer on this thread best answered your original question by pressing the "This answered my question" button to the far right of the up/down arrows.
Armando,
I don't know if this helpful, and I can't take credit for it crating the code (I found it in an answer in this forum), but this Javascript is really handy:
//Converts text to uppercase if fields CSS Class is set to upperCaseMe $(document).ready(function(){ $('.upperCaseMe input').focusout(function() { $( this ).val($( this ).val().toUpperCase()); }); });