It sounds like something else is missing. Can you post your current code?
-Leigh
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http://
That did get rid of the error but now it isn't inserting anything. It appears
to be ignoring the statement altogether.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/143027215
> ie found = REFind(url.terms, DocContents, startAt, TRUE );
>-Le
lol.. Even my name is being truncated ;
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/143027215
Did you forget to modify reFind so it returns subexpressions (ie a structure
not a number)?
ie found = REFind(url.terms, DocContents, startAt, TRUE );
-Le
~|
Order the Adobe Coldfusion Anthology now!
http
cript version to see if the lack of tags makes a
> difference.)
>
> startAt = 1;
> for (i = 1; i <= ArrayLen(getMatches); i++) {
> found = REFind(url.terms, DocContents, startAt, true);
> // insert *before* the matching string
> DocContents
Looks like my last reply was truncated. (Out of curiosity, I am resending a
cfscript version to see if the lack of tags makes a difference.)
startAt = 1;
for (i = 1; i <= ArrayLen(getMatches); i++) {
found = REFind(url.terms, DocContents, startAt, true);
// ins
A lot depends on the search pattern. But as you loop keep track of where the
previous occurrence was found. Then start searching *after* that position.
Otherwise, refind will just return the first occurrence over and over again.
You can use the fourth parameter of reFind to get the position
So, any suggestions how to go about that? I just want to highlight words in a
searched document and allow the user to go to next and previous match in long
documents. I thought adding a would be a good way
using an Insert function. Now, I'm clueless on how to go about it.
~~~
> REFind( url.terms, DocContents, ...)
Also the code probably will not behave as expected if you are searching for
partial words. Since you are searching starting from the beginning of the
string each time, rather than the last occurre
> inserts the number in the wrong spot.
Insert adds the string *after* the given position, not before. So you need to
deduct 1 from the result of reFind()
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.
Thanks Carl,
Now it just ignores it altogether and doesn't put any number in at all.
~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive:
http:
The docs for REFind() say that the third argument should be a positive
integer, default value is 1.
REFind() returns the position in the string where the matched string
begins. You'll need to add the length of the matched string (in your
case, Len(url.terms) ) to this value to get the e
I've been banging my head on this all day. All I want to do is put a number to
the left of each word that I find in my document so that I can eventually turn
those into links to jump from one match to the next. I have it partially
working. Here is my code:
What happens is, I put in c
[mailto:[EMAIL PROTECTED]
Sent: 07 October 2008 09:56
To: cf-talk
Subject: Re: ReFind - finding too much :-(
this is doing the trick
Thanks for your assistance Adrian.
On Tue, Oct 7, 2008 at 5:48 PM, AJ Mercer <[EMAIL PROTECTED]> wrote:
> like this local.fieldValue)>
>
&g
>>
>> Adrian
>>
>> Building a DB of errors at http://cferror.org/
>>
>> -Original Message-
>> From: AJ Mercer [mailto:[EMAIL PROTECTED]
>> Sent: 07 October 2008 09:32
>> To: cf-talk
>> Subject: ReFind - finding too much :-(
&g
top invalid dates like
>
> 2008-99-99T99:99:99
>
> Adrian
>
> Building a DB of errors at http://cferror.org/
>
> -Original Message-
> From: AJ Mercer [mailto:[EMAIL PROTECTED]
> Sent: 07 October 2008 09:32
> To: cf-talk
> Subject: ReFind - finding too much :
PROTECTED]
Sent: 07 October 2008 09:32
To: cf-talk
Subject: ReFind - finding too much :-(
I have a generic function that processes all sorts of data
One in particular I want to identify and do a search and replace on
sample data: 2008-10-07T16:21:17
I want to swap the T for a space
But I only wan
I have a generic function that processes all sorts of data
One in particular I want to identify and do a search and replace on
sample data: 2008-10-07T16:21:17
I want to swap the T for a space
But I only want to do it if the data is in this format
I came up with this, but it is returning true
Hi Will,
I sincerely apologise to you and to anyone else who got the impression that I
was someone who jsut wanted a quick solution. I began working on this yesterday
evening, I have spent all of today trying out different things but have not had
any luck yet.
This is what I've managed so far:
>>I want to loop through a directory in my codebase and return a list
of href tags
This could be easily handled by CF_Reextract.
You can get all your hrefs in a query using simple regExps.
See http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm
--
__
>Is someone willing to help me with my problem? I would very much appreciate
>your help.
>
>Regards,
>J
I'll tell you what I do in situations like this. I read info/books about Regexs
and try to solve it myself.
I may work on a problem for hours without finding a solution.
Then, if I can't f
Is someone willing to help me with my problem? I would very much appreciate
your help.
Regards,
J
> Hello everybody,
>
> I need your help with regular expressions. I want to loop through a
> directory in my codebase and return a list of href tags. The href
> value for ex must be in this forma
Hello everybody,
I need your help with regular expressions. I want to loop through a directory
in my codebase and return a list of href tags. The href value for ex must be in
this format. #request.udf.geturl(NUMERIC VALUE,STRING)#
FREE
Here's what I have for now:
Processing #viewDir.record
re* functions are inherently slower than their find* equivalents.
There's a startup cost for the RegEx engine.
--Ben Doom
Barney Boisvert wrote:
> Those aren't equivalent. REFind does a case-sensitive RegEx search.
> find (which you didn't list) does a case-sensitive searc
Those aren't equivalent. REFind does a case-sensitive RegEx search.
find (which you didn't list) does a case-sensitive search. contains
does a case-INsensitive search. I'd expect contains and findNoCase to
be roughly equivalent, with REFindNoCase lagging slightly. Find and
and R
Hi all,
Suffering from a post Halloween brain freeze here, but I cannot remember which
would be faster:
or
thanks,
larry
--
Larry C. Lyons
Web Analyst
BEI Resources
American Type Culture Collection
http://www.beiresources.org
email: llyons(at)atcc(dot)org
tel: 703.365.2700.2678
--
Try this:
It gave me:
psyEx = 14
psy = 11
-Original Message-
From: Scott Stewart [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 15, 2007 12:50 PM
To: CF-Talk
Subject: RE: REFind
What I want to happen is this:
>From
wrong and the pattern's not
matching or.. I should be doing this some other way than REFind, which I
can't figure out.
sas
--
Scott Stewart
ColdFusion Developer
SSTWebworks
7241 Jillspring Ct.
Springfield, Va. 22152
(703) 220-2835
http://www.sstwebworks.com
-Original Message-
Not sure from your message what exactly is happening, but
try this statement for your REFind()
Steve Brownlee
http://www.fusioncube.net/
- Original Message Follows -
From: "Scott Stewart" <[EMAIL PROTECTED]>
To: CF-Talk
Subject: REFind
Date: Tue, 15 May 2007 11:21:28
Hey all,
I may not be understanding REFind properly.
I have this:
What's coming in is a list of UID's from a form. The UID's that match the
pattern are ignored by an outboard appli
Thanks, to everyone who replied. My statement will always have a Select and FROM so I went with the which works great.
Thanks again!
- Charles
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
e
> cases) there is no select statement, it will return the whole string.
> That is why I usually go with REFind/Mid.
>
> 2. If you are looking for a column list, I would also add some \s in the
> regexp:
>
> "^.*?SELECT\s(.*?)\sFROM\s.*$"
>
> If you don
> 1. This will work if you always have a select statement.
> If (in some
> cases) there is no select statement, it will return the
> whole string.
> That is why I usually go with REFind/Mid.
Although if he's using regex to get the column list, it's a safe bet
that it wi
1. This will work if you always have a select statement. If (in some
cases) there is no select statement, it will return the whole string.
That is why I usually go with REFind/Mid.
2. If you are looking for a column list, I would also add some \s in the
regexp:
"^.*?SELECT\s(.*?)\sF
For that, the query needs to be executed. In his example, theQuery is
just a string (probably containing sql)
Pascal
> -Original Message-
> From: Adam Haskell [mailto:[EMAIL PROTECTED]
> Sent: 01 September 2004 14:44
> To: CF-Talk
> Subject: Re: REFind Help ...
>
>
#the_query.columnlist#
Adam H
On Wed, 1 Sep 2004 08:11:13 -0400, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> > Hello,
> > I have a string and I need to get a certain part out of it
> > and pipe it in to another variable.
>
> > Here is what I have --
>
> >
> > Here are all of the columns in you
> Hello,
> I have a string and I need to get a certain part out of it
> and pipe it in to another variable.
> Here is what I have --
>
> Here are all of the columns in your query #NewString#
> What I get is a "1", I was really looking for the string.
rereplacenocase(theQuery,"^.*?SELECT(.*?)F
Refind without the "returnsubexpressions" argument will return the
position of the match. You need to extract the match yourself (and use
subexpressions for that).
stTmp = REFindNoCase("SELECT\s+(.*?)\s+FROM\s",theQuery,1,true);
if(stTmp.pos[1])
NewString = Mid(theQuery,stTm
Hello,
I have a string and I need to get a certain part out of it and pipe it in to another variable.
Here is what I have --
Here are all of the columns in your query #NewString#
What I get is a "1", I was really looking for the string.
Thanks,
- Charles
[Todays Threads]
[This Message]
[S
ArrayNew(1);
// find matches for expressions
while(true){
if(caseSensitive)
stTmp = REFind(regexp,string,start,true);
else
stTmp = REFindNoCase(regexp,string,start,true);
if(stTmp.pos[1] IS 0) break;
if(returnSubexpressions){
aTmp = ArrayNew(1);
for(i=1;i LE ArrayLen(stTmp.p
/>
#Evaluate(posStart+4)#, #evaluate(posStop-posStart-4)#)) />
#posStop#) />
Searches through #form.text# for occurrences of "{img([[:digit:]]+)\}",
i.e. {img123123}. It then stores the list of img numbers in an array
called "values", e.g. {img123123} becomes 123123. This array can
Damien McKenna wrote:
> On Jun 10, 2004, at 4:20 PM, Jochem van Dieten wrote:
>>
>>
>> REReplaceNoCase(Form.Text,"^.*\{img([[:digit:]]+)\}.*$", "\1")>
>
> How do I get this to work with multiple occurences, e.g. the "All" in
> REReplace?
That won't work.
Jochem
[Todays Threads]
[This Messa
On Jun 10, 2004, at 4:20 PM, Jochem van Dieten wrote:
>
> REReplaceNoCase(Form.Text,"^.*\{img([[:digit:]]+)\}.*$", "\1")>
How do I get this to work with multiple occurences, e.g. the "All" in
REReplace?
--
Damien McKenna - Web Developer - [EMAIL PROTECTED]
The Limu Company - http://www.thelimuc
>>Is there an easy way to do
that without doing an elaborate series of Mid and REFind statements?
Yes, you might use CF_REExtract (see link below)
It can return in a query the string found, + position length, etc.
You can specify regular expressions to be found BEFORE and AFTER the string y
Damien McKenna wrote:
> On Jun 10, 2004, at 3:36 PM, Jochem van Dieten wrote:
>
>>> I need to search for a regular _expression_ and return the data found as
>>> opposed to the position it was found at.
>>
>> REReplace. Make sure you match the entire string and replace it
>> with a parenthesed sub
On Jun 10, 2004, at 3:36 PM, Jochem van Dieten wrote:
>> I need to search for a regular _expression_ and return the data found as
>> opposed to the position it was found at.
>
> REReplace. Make sure you match the entire string and replace it
> with a parenthesed substring.
Here's what I have now.
Damien McKenna wrote:
> I need to search for a regular _expression_ and return the data found as
> opposed to the position it was found at. Is there an easy way to do
> that without doing an elaborate series of Mid and REFind statements?
REReplace. Make sure you match the entire s
You can use the REFind / REFindNoCase but add the attribute of:
returnsubexpressions
Optional. Boolean. Whether to return substrings of reg_expression, in arrays named len and pos:
* True: if the regular _expression_ is found, the first array element contains the length and position
I need to search for a regular _expression_ and return the data found as
opposed to the position it was found at. Is there an easy way to do
that without doing an elaborate series of Mid and REFind statements?
Thanks.
--
Damien McKenna - Web Developer - [EMAIL PROTECTED]
The Limu Company
L PROTECTED]
> Sent: Wednesday, 25 February 2004 2:46 AM
> To: CF-Talk
> Subject: Re: REFind
>
> Not within a character class. If you're careful about how you construct
> it, you never have to escape anything in a class. Unless I forgot about
> something, or course.
Show me and I will remember
Teach me and I will learn
-Original Message-
From: Ben Doom [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 25 February 2004 2:46 AM
To: CF-Talk
Subject: Re: REFind
Not within a character class. If you're careful about how you construct
it, you never have
gt; Sent: Tuesday, 24 February 2004 8:17 PM
> To: CF-Talk
> Subject: RE: REFind
>
> REFind("[^0-9]",form.PropertyDataPrice)
>
> If you want to allow other caracters like . and , add them in the class:
> REFind("[^0-9.,]",form.PropertyDataPrice)
>
>
Only if it is not in a character class.
> -Original Message-
> From: Taco Fleur [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 24 februari 2004 11:36
> To: CF-Talk
> Subject: RE: REFind
>
> Don't you have to escape the period? like so \.
>
>
Thanks Pascal, that's great! :)
-- Original Message --
From: "Pascal Peters" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Tue, 24 Feb 2004 11:16:48 +0100
>REFind("[^0-9]",form.PropertyDataPrice)
>
>If you
ailto:[EMAIL PROTECTED]
Sent: Tuesday, 24 February 2004 8:17 PM
To: CF-Talk
Subject: RE: REFind
REFind("[^0-9]",form.PropertyDataPrice)
If you want to allow other caracters like . and , add them in the class:
REFind("[^0-9.,]",form.PropertyDataPrice)
> -Original Mess
REFind("[^0-9]",form.PropertyDataPrice)
If you want to allow other caracters like . and , add them in the class:
REFind("[^0-9.,]",form.PropertyDataPrice)
> -Original Message-
> From: Stuart Kidd [mailto:[EMAIL PROTECTED]
> Sent: dinsdag 24 februari 2004
Sorry, that line should have read:
Price must only be numbers baby.">
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
Hi guys,
I'm trying to make sure that my field has ONLY numeric characters otherwise show an error. I'm using the REFind but it doesn't pick up characters like " $ £ etc.
Price must only be numbers baby.">
Any ideas?
Cheers,
Stu
[Todays Threads]
[This Messa
PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, 12 February 2004 8:27 AM
To: CF-Talk
Subject: Re: Refind on CFServer 5
so, what do I use for cf5 to understand the _expression_? ^60C.*{9}$
> CF5 regular expressions are POSIX rather than Perlish. So \d is being
> interpreted as either
so, what do I use for cf5 to understand the _expression_? ^60C.*{9}$
> CF5 regular expressions are POSIX rather than Perlish. So \d is being
> interpreted as either 'd' or '\d' (I forget offhand) rather than a digit.
>
> --Ben Doom
>
> [EMAIL PROTECTED] wrote:
>
>> On MX this code works fine. On
CF5 regular expressions are POSIX rather than Perlish. So \d is being
interpreted as either 'd' or '\d' (I forget offhand) rather than a digit.
--Ben Doom
[EMAIL PROTECTED] wrote:
> On MX this code works fine. On server 5 in returns that all variables are
> false:
>
> #ListGetAt(form.SerialNu
On MX this code works fine. On server 5 in returns that all variables are
false:
#ListGetAt(form.SerialNumber, i)#)>
The regexpression coming from the db looks like this: ^60C\d{9}$
Thanks!
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
Try the REwizard to test your RegExpressions. It will even CFHTTP the page for you.
See: http://www.contentbox.com/claude/customtags/tagstore.cfm?p=hf
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http
The following finds me the set of itemids after submitting a search to Ebay.
>From this I create a unique list of items. I then attempt to find the name
of the item:
]+>([^()]*)",
cfhttp.FileContent, 1, "True")>
#listidx#: #mid(cfhttp.FileContent
http://www.fusionauthority.com/alert/index.cfm?alertid=5#Tech2
The results are from CF 4.5 but you can see the basics.
At 07:05 PM 1/28/02, you wrote:
>Offhand, I'd think REFind() would be faster than REFindNoCase(), since
>neither the string being tested, nor the RE would have to
Offhand, I'd think REFind() would be faster than REFindNoCase(), since
neither the string being tested, nor the RE would have to transformed to all
caps (or all lowercase) prior to the test.
If I've got an RE that already takes into account case insensitiviy by using
character clas
At 04:03 PM 3/30/01 -0500, you wrote:
>http://www.houseoffusion.com/hof/functions.cfm
>Keep this chart as a reference. It'll help many-a-time. If I ever get the
>time/money to finish my functions book then that'll be made into a poster
>(subdivided into sections rather than alphabetical).
Michael
now about REFind's 4th attribute.
>
> You've helped me before, and you helped me again.
>
> Thanks,
> Jamie
>
> On Fri, 30 Mar 2001 15:26:40 -0500, in cf-talk you wrote:
>
> >To get a backreference in a REFind() you have to set the 4th attribute of
&
Wow, brilliant! I didn't know about REFind's 4th attribute.
You've helped me before, and you helped me again.
Thanks,
Jamie
On Fri, 30 Mar 2001 15:26:40 -0500, in cf-talk you wrote:
>To get a backreference in a REFind() you have to set the 4th attribute of
>the function t
You want REReplaceNoCase.
-Original Message-
From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 1:50 PM
To: CF-Talk
Subject: Back-referencing after a REFind to set a variable?
Hi,
Is there a way to do this sort of thing?
REFind("(before)(HeresTheString
Heh, you're not going to get anything so nice as Perl string handling.
str = "foo123bar" ;
found = reFind("foo([[:digit:]]+)bar", str, 1, true) ;
sub_str = mid(str, found.pos[2], found.len[2]) ;
The last argument of the reFind() is 'return sub expressions'
To get a backreference in a REFind() you have to set the 4th attribute of
the function to true. Your function would then look like
sReference=REFind('(before)(HeresTheStringIWant)(after)',
myTargetString,1,1);
which says find the pattern in myTargetString starting with position 1 and
Hi,
Is there a way to do this sort of thing?
REFind("(before)(HeresTheStringIWant)(after)", myTargetString);
variables.foundstring = \2;
If not, what's the usual way to go about it? Seems like it could get
pretty ugly if there isn't a similar
REFind uses Regular Expressions to do the search and is more powerful while
Find does a simply character search.
According to my article REFind is slightly slower, but only by like .03
milliseconds. Nothing to ever worry about. :)
http://www.fusionauthority.com/alert/index.cfm?alertid=4#Tech2
What's the difference between Find() and REFind()?
Bernd VanSkiver
[EMAIL PROTECTED]
ICQ #: 916324
~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives:
To strictly answer your qestion, try:
REFind("[[:space:]]",line)
However, I will tell you that it looks to me like you are doing things the
long way around. :) Given the line you gave as an example, could you not
just do something akin to:
-Rick
-Original Message
I am looping over a list that contains the names of mailing lists. The
delimiter in the loop is the carriage return. I am trying to identify the
position of the first space in the index. I thought the regex for a space
was /s, but that is not working here as the REFind always returns a zero.
This
77 matches
Mail list logo