how about

/^[a-z0-9]{n}X/i

where n is the index of the character and X is the character?




"Howie Hamlin" <[EMAIL PROTECTED]> on 02/22/2002 11:50:58 AM

Please respond to [EMAIL PROTECTED]

To:   CF-Talk <[EMAIL PROTECTED]>
cc:

Subject:  RegEx rookie question


Is there a way to check for a character in a specific position in a str
ing?
For example, say I want to make sure that the 10th
character in a string is an X.

This would be a match: 123456789X12345

Would I have to use a pattern like ?????????X

or is there something more elegant?  Using something like the above wou
ld
be cumbersome for matching the 125th character, for
example.

Thanks,

--
Howie Hamlin - inFusion Project Manager
On-Line Data Solutions, Inc. - www.CoolFusion.com  - 631-737-4668
 x101
inFusion Mail Server (iMS) - The Intelligent Mail Server
>>> Find out how iMS Stacks up to the competition:
http://www.coolfusion.com/imssecomparison.cfm


______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to