Okay, should we call you Benjamin "little tricks" Bloodworth?
Keep those little tricks coming...
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Benjamin
Bloodworth
Sent: Tuesday, September 25, 2007 11:32 AM
To: discussion@acfug.org
Subject: RE: re[2]:
Thanks for the comments. I can't take all the credit though. The
coldfusion function is what builds the array. You just have to know the
little tricks to get it to return it, like putting parentheses in your
regular expression and true as the 4th argument.
Benjamin Bloodworth
[EMAIL PROTECTED]
Benjamin, that is an excellent--and educational--response. I was only
following the thread of this post "in the background" and hadn't thought of
using an array. Your solution is simple and adaptable. Good work.
Dan K
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] O
Excellent. Thanks everybody!
Mischa.
:
:
:
: #Mid(MyString, MyNumbersArray.pos[1], MyNumbersArray.len[1])#
:
: That would return the number in the string. The parentheses is the regular
: expression groups the result. The + indicates one more numbers in a row.
: The number 1 is where to st
#Mid(MyString, MyNumbersArray.pos[1], MyNumbersArray.len[1])#
That would return the number in the string. The parentheses is the regular
expression groups the result. The + indicates one more numbers in a row.
The number 1 is where to start the search. True tells cf to return
subexpressions
It's finding the POSITION within the string of the first digit.
ed
--
Ed Szwedo
Web Development Team Lead
CSC
E-mail: [EMAIL PROTECTED]
919-541-3955 (Voice)
919-685-3395 (Fax)
That will tell you the position where cf found a number. You could then
use something like Mid(string, start, count) to return the actual number.
Start would be the "22" and count would be how big a number you want, 5 in
your case. Then compare that result to 72000 and so on.
Sorry I can't give
Thanks Ben!
I'm not a RE wiz, so I'm not sure I understand why
REFindNoCase("[0-9]", "ATTN: JOE SMITH PO## 72274");
results in "22"... ?
: REFindNoCase("[0-9]", MyString)
: You may have to play around with the regular expression some to get exactly
: what you want, but that should get you st
REFindNoCase("[0-9]", MyString)
You may have to play around with the regular expression some to get exactly
what you want, but that should get you started.
Benjamin Bloodworth
[EMAIL PROTECTED]
850.702.0052
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
I thought I once saw a function in CF that would find a numeric part anywhere
in a string, but I can't find it anymore (or was I dreaming?)
Anyway, here are some sample strings I need to parse:
"ATTN: JOE SMITH PO# 72274"
"3150 holcomb bridge road"
" PO# 72049"
" 6311 COURT ST."
"PO's 72993,
10 matches
Mail list logo