So I'm basically trying to validate a column in my SharePoint list to have a Specific letter as the starting character of the field. I'm running into an issue with capitalization. I need the first character to be only uppercase. This is what I currently have but it is not validating for only uppercase. (67 is the ascii code for the letter "c"). Thank you!
CODE(MID([Column Name],1,1)=UPPER(67))
Try this.
=if(CODE(MID([Test],1,1))=67,true,false)
Or use JavaScript to validate PreSaveAction
https://social.technet.microsoft.com/wiki/contents/articles/31330.sharepoint-using-presaveaction-function-on-custom-list-forms.aspx
Related
So I am looking to extract a set of characters from unique reset verification codes that I get in my emails. Meaning, what im trying to extract will be different every time. This is the example:
"You requested one-time code for authentication.
Your code is 7a8c28
Enter the code to verify your login."
I am trying to extract the "7a8c28" (without the quotation marks).
This is the regex expression I have written because I am trying to remove the whitespace after the "is":
[^is_\s*]*$
However, that expression above spits out a single period, and not the 7a8c28.
Am i missing something here? Or is there a better expression to use? Thank you for any assistance.
\sis\s(\w+)\b
captures the code as captured group 1 ($1).
\bis\h*(\S+)$
will capture in group 1 the value you're searching for.
Demo & explanation
I am trying to have Google Analytics record a goal when a user lands on a specific page. My client's sales funnel uses dynamic parameters within the URL as you can see below. Unfortunately, I cannot figure out how to fire a goal when a user lands on /2eR54 and not when they land on /confirm.
Goal: /booking/SDFG/2eR54
Not Goal: /booking/SDFG/confirm
Quick notes: The first dynamic field is always four capitalized letters; the second dynamic parameter is a combination of digits and capitalized and non-capitalized letters.
I've tried using the following but /confirm still fires a conversion: .*/booking/[A-Z]{4}/[0-9A-Za-z]{5}
I appreciate your help with this matter.
The regex \/booking\/[A-Z]{4}\/\w{5}$ may fit your needs.
It matches /booking/, four capital letters, /, and then 5 word characters, followed by the end of the string. (If this URL won't be at the end of the string, you may also be able to use \b, the word boundary.)
Demo
I am trying to create a regular expression in Google Forms for a quiz for middle-schoolers. I would like for the quiz to display an error code if students do not include any capital letters in their response. I would also like for the form to enforce a minimum character limit (250). I have tried using:
/^.{250,}$/
But Google Forms throws an error and reverts to previous version of the form whenever I put in curly braces. Here's what I have so far to check for capitalization:
[A-Z]*[.]\s[A-Z]
How do I add onto this to get it to also check for character length? As you can probably tell, I'm a novice. A teacher, not a programmer. I'd appreciate your help.
Wiktor is correct regarding the capabilities to check the entire response for capitalization and length. If you simplified the requirement to deal with answers that start with a capital letter (which is a specialization of your initial requirement), you could use this regex: ^[A-Z].{249,}
I am using the (very awesome) "Autocomplete Menu" to validate some SQL code for me. The Automcomplete menu uses Regex to suggest autocomplete items.
The default Regex is
[\w\.]
which works fine for words with a whitespace boundary. Essentially, I have a set of SQL keywords, and a set of Tables and Fields that are commonly used. Using our database, my queries need to prefix the table name. To get it to work properly, what I want is to get the autocomplete menu to treat a "." as whitespace. I.e. at the moment, if I have a Table called "PEOPLE" that has a field called "FIRST_NAME", I want the autocomplete to trigger at:
PEOPLE.FIR
to give me the "FIRST_NAME" option.
I.e. at present it works if I type FIR, but not if I type PEOPLE.FIR
Is there a Regex that anyone can suggest that will treat the "." as a word boundary? I tried searching a few regex sites, but didn't find anything useful.
Remove the literal dot from the regex if you do not want it to match literal dots.
Try PEOPLE\.FIR
The \ character escapes the . and tells it to interpret . as . itself.
I guess the following line of code looks familiar to many...
[^A-Za-z0-9]
And what I'd like to do is to keep a block of "text", alphnumeric as stated above and plus punctuations and other special characters that sql for MS Access can handle, also, the special character of # sign would be replaced with ## (a double of it to escape a single #) for the underlying scripting language I'm using (Railo). So, to sum up, I'd like to remove any character that Access and Railo can't handle prior to writing the string into a db table.
The above alphnumeric is a start. Can you help to make it complete?
Thanks.
Railo can handle every character that I'm aware of. Not sure what the author of the question is implying. The pound character is the only character that I'm aware of that needs to be escaped. If the user used the proper <cfqueryparam> correctly, he should be able to insert just about anything he wants in Access.