Solved

Coldfusion String Manipulation

Posted on 2011-02-24
2
312 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now