Solved

Coldfusion String Manipulation

Posted on 2011-02-24
2
315 Views
Last Modified: 2012-05-11
I'm not really a coldfusion guy - but I've inherited a bunch of coldfusion sites to maintain.

On one site - I'm going to be posting from a form to a function that needs to analyze the posted fields.

Essentially - what I want the function to do is determine "Are the first two characters numeric?"

So, if the post is 32aeoigoega, 54aoieghiaeg or 93aoeigea - it will validate as true...but ae135890135 would validate as false.

What would the script for that be like in CF?  500 points to anyone who can keep me from having to read a coldfusion reference manual.
0
Comment
Question by:erzoolander
2 Comments
 
LVL 19

Accepted Solution

by:
Jones911 earned 500 total points
ID: 34974794
<cfif isNumeric(left(theStringVariable,2))>
   true
<cfelse>
  false
</cfif>
0
 
LVL 1

Author Closing Comment

by:erzoolander
ID: 34975074
Gracias!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question