MatchText

2010-10-08 Thread Warren Kuhl
What is the syntax of the matchtext command to search a variable for multiple characters (., ! or ?). If it contains any characters in my list, it returns a TRUE? I am able to get it working with one value... answer MatchText(tValue,(\.)) Thanks for any help! Warren

Re: MatchText

2010-10-08 Thread Mike Bonner
...@gmail.com wrote: What is the syntax of the matchtext command to search a variable for multiple characters (., ! or ?). If it contains any characters in my list, it returns a TRUE? I am able to get it working with one value... answer MatchText(tValue,(\.)) Thanks for any help! Warren

Re: MatchText

2010-10-08 Thread DunbarX
I am no expert, but this: \xabcd\y will match any char of abcd. I think. Craig Newman ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

regex/matchtext question

2009-02-05 Thread Klaus Major
Hi all, I have a nice matchtext script that extract placeholders from a text. Like everything between and or :: or { and } This is the function I use, it#s a little script of Ken Ray (thanks Ken!) that I could understand, at least a bit to modify it:-) ## extract placeholder tText

Re: regex/matchtext question

2009-02-05 Thread Jim Ault
:) in dertext replace :: with empty in dertext filter dertext with (:*:) replace : with :: in dertext--we are done end if return dertext end getList Hope this helps. Jim Ault Las Vegas On 2/5/09 2:50 AM, Klaus Major kl...@major-k.de wrote: Hi all, I have a nice matchtext script

Re: regex/matchtext question SOLVED

2009-02-05 Thread Klaus Major
Hi all, after carefully reading my own post, I found the answer :-) Now it works with [ and [[! See below for the solution. Hi all, I have a nice matchtext script that extract placeholders from a text. Like everything between and or :: or { and } This is the function I use, it#s

Re: regex/matchtext question

2009-02-05 Thread Klaus Major
Hi Jim, looks like you missed my second post, I already found the solution to my problem. Difficulty one is that '[' is a special character in regular expressions and escaping can make using them even more confusing. This is also true of the filter command. Anyway, thanks for you

matchText, does it really exist?

2008-07-10 Thread Bert Shuler
This code is from the docs, but seems to fail as if matchText is not a function. on mouseUp matchText(Goodbye,bye) end mouseUp executing at 4:09:47 PM TypeHandler: can't find handler Object Button LinematchText(Goodbye,bye) HintmatchText Any Ideas? Bert

Re: matchText, does it really exist?

2008-07-10 Thread Jan Schenkel
--- Bert Shuler [EMAIL PROTECTED] wrote: This code is from the docs, but seems to fail as if matchText is not a function. on mouseUp matchText(Goodbye,bye) end mouseUp executing at 4:09:47 PM Type Handler: can't find handler ObjectButton Line matchText(Goodbye,bye

Re: matchText, does it really exist?

2008-07-10 Thread Bert Shuler
worked. Thanks for the quick help. Bert On Jul 10, 2008, at 4:25 PM, Jan Schenkel wrote: --- Bert Shuler [EMAIL PROTECTED] wrote: This code is from the docs, but seems to fail as if matchText is not a function. on mouseUp matchText(Goodbye,bye) end mouseUp executing at 4:09:47 PM Type

Re: matchText, does it really exist?

2008-07-10 Thread Mark Schonewille
: This code is from the docs, but seems to fail as if matchText is not a function. on mouseUp matchText(Goodbye,bye) end mouseUp executing at 4:09:47 PM TypeHandler: can't find handler Object Button LinematchText(Goodbye,bye) HintmatchText Any Ideas? Bert

Re: Field Validation with MatchText

2008-01-11 Thread Eric Chatonet
)?) into tRegExp answer information Code = tCodeToCheck Exp = tRegExp return matchText(tCodeToCheck, tRegExp) end CheckPostalCode I have added a debug statement and the data the I have entered is being sent to the matchText function and the regular express is as I defined. Once the error

Field Validation with MatchText

2008-01-10 Thread dcpbarrington
CheckPostalCode tCodeToCheck put ^(\d5(( |-)\d4)?) into tRegExp answer information Code = tCodeToCheck Exp = tRegExp return matchText(tCodeToCheck, tRegExp) end CheckPostalCode I have added a debug statement and the data the I have entered is being sent to the matchText function

Re: Field Validation with MatchText

2008-01-10 Thread Sarah Reichelt
My data validation is failing in a strange way. If I enter the correct value, the validation comes back TRUE and everything is ok, but if I put in a BAD value, the data validation returns FALSE and displays the correct error message. WORKS AS EXPECTED, BUT The application returns the user

Re: matchText and accented characters

2007-10-17 Thread Chris Sheffield
Thanks, Ken. Using the hex equivalents is an interesting suggestion. I may look into that further. As for replacing the accented characters with their non-accented equivalents, that is also something I've done in the past, but the problem here is that this is Mac/PC cross platform, so it's

matchText and accented characters

2007-10-16 Thread Chris Sheffield
The matchText function seems to be failing when searching for accented characters like á, é, í, ó, or ú. I'm not really up on my regex. Is there something special I need to do to make these characters work? For example, one search I'm performing is for the word fiancé. Thanks, Chris

Re: matchText and accented characters

2007-10-16 Thread Chris Sheffield
Sorry, I'm using matchChunk, not matchText. But maybe the solution is the same? On Oct 16, 2007, at 11:49 AM, Chris Sheffield wrote: The matchText function seems to be failing when searching for accented characters like á, é, í, ó, or ú. I'm not really up on my regex. Is there something

Re: matchText and accented characters

2007-10-16 Thread Andres Martinez
Hello Chris I think you need to check on the unicode setting. Use the following line before your search... set the useUnicode to true Regards, Andres Martinez www.baKno.com On Oct 16, 2007, at 1:59 PM, Chris Sheffield wrote: Sorry, I'm using matchChunk, not matchText. But maybe

Re: matchText and accented characters

2007-10-16 Thread Chris Sheffield
Thanks, Andres. But that didn't seem to fix the problem. That property, according to the docs, only seems to apply to the numToChar and charToNum functions. I did try it just to make sure. On Oct 16, 2007, at 12:02 PM, Andres Martinez wrote: Hello Chris I think you need to check on the

Re: matchText and accented characters

2007-10-16 Thread Ken Ray
On Tue, 16 Oct 2007 12:18:54 -0600, Chris Sheffield wrote: Thanks, Andres. But that didn't seem to fix the problem. That property, according to the docs, only seems to apply to the numToChar and charToNum functions. I did try it just to make sure. The issue is that PCRE (which is the lib

Re: matchtext question using regex

2007-05-05 Thread Jim Ault
try studying the | symbol, which is OR There are many ways of using it with strings and substrings and patterns. Jim Ault Las Vegas On 5/4/07 10:41 AM, ron [EMAIL PROTECTED] wrote: Regex question for use in matchtext I want to find word A followed by word B. (quickly) So: put this is my

matchtext question using regex

2007-05-04 Thread ron
Regex question for use in matchtext I want to find word A followed by word B. (quickly) So: put this is my big dog called cat. into thetext put my.{0,5}dog into reg And put matchtext(thetext,reg) returns true because I use a period so it is counting characters but I need it to count words. I

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-21 Thread Peter Alcibiades
Can you do it with a text editor and regular expressions? I'm genuinely diffident about asking, because you all have so much more experience that if it were this easy, you'd have suggested it. But anyway, is there something wrong with the following? I made up a fragment of a file like this

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-21 Thread Jim Ault
for others on the list, but it seems that those who venture into regEx only occasionally, get frustrated and are better off using the chunking expressions of Rev. Even when presented with a good regEx answer, they are not sure what they are looking at. By the way, nulls will make MatchText, etc fail, so

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-21 Thread Peter Alcibiades
There is a wonderful book I just found for this sort of thing, and am working through: Minimal Perl, by Tim Maher. Awk is great, terse, powerful, but a bit opaque. And more up to date people always seem to talk about using Perl for what awk always was used for. Well, if you ever felt you

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-20 Thread Bryan McCormick
Jim, Dave, Devin Thanks for your help in making me think harder about this. I literally woke up out of a dream this morning and knew right away what was wrong with the script. There was one error that would have persistently been a problem that I have fixed now. In the interests of anyone

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-20 Thread Jim Ault
Jim, Dave, Devin Thanks for your help in making me think harder about this. I literally woke up out of a dream this morning and knew right away what was wrong with the script. There was one error that would have persistently been a problem that I have fixed now. Glad it worked out so well.

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-20 Thread Devin Asay
On Mar 20, 2007, at 9:29 AM, Jim Ault wrote: On Mar 20, 2007, at 4:12 AM, Bryan McCormick wrote: Jim, Dave, Devin Thanks for your help in making me think harder about this. I literally woke up out of a dream this morning and knew right away what was wrong with the script. There was one

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-20 Thread Jim Ault
On 3/20/07 9:42 AM, Devin Asay [EMAIL PROTECTED] wrote: Wait, when is it ever *not* sunny in Las Vegas? ;-) Very seldom. About twice a year we will have 3 days in a row of cloudy weather. Jim ___ use-revolution mailing list

Re: Re: MatchText, MatchChunk and the needle in the haystack

2007-03-19 Thread Bryan McCormick
Jim, Thanks for the script snippet. It didn't quite work as shown, but it did get me to think about the problem more carefully. I came up with this: put -Jan-,-Feb-,-Mar-,-Apr-,-May-,-Jun-,-Jul-,-Aug-,-Sep-,-Oct-,-Nov-,-Dec- into mthStrings -- i seemed to need to separate the routine

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-19 Thread Dave
Hi, Not 100% sure, but should you start from 1? e.g. put 0 into pos should be: put 1 into pos All the Best Dave On 19 Mar 2007, at 17:24, Bryan McCormick wrote: -- note that i added a third param in case i need to force the routine to start elsewhere. it is set to 0 when i run

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-19 Thread Jim Ault
On 3/19/07 10:49 AM, Bryan McCormick [EMAIL PROTECTED] wrote: Dave, Sadly it does not impact the outcome. Mind you I tried it just in case. I have played with all the vars that I can think of and it does nothing. It does not even appear to matter (as I thought) if there are multiple

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-19 Thread Devin Asay
On Mar 19, 2007, at 11:24 AM, Bryan McCormick wrote: Jim, Thanks for the script snippet. It didn't quite work as shown, but it did get me to think about the problem more carefully. I came up with this: put -Jan-,-Feb-,-Mar-,-Apr-,-May-,-Jun-,-Jul-,-Aug-,-Sep-,-Oct-,- Nov-,-Dec- into

MatchText, MatchChunk and the needle in the haystack

2007-03-18 Thread Bryan McCormick
a return before the next date occurrence. As in the text is 06-Mar-92therewasamangledbitoftexttodealwith02-Apr-92therest... I cannot seem to get the MatchText to work properly to identify these, but I guess really the problem is I still need to find an offset for each. Is MatchText even the right

Re: MatchText, MatchChunk and the needle in the haystack

2007-03-18 Thread Jim Ault
-Apr-92therest... I cannot seem to get the MatchText to work properly to identify these, but I guess really the problem is I still need to find an offset for each. Is MatchText even the right thing to use? Can I use it in conjunction with offset(MatchText(myVar,[0-9]-(Jan|Feb|Mar...|Dec)-[0

matchText

2007-01-21 Thread Robert Mann
I was using the following to match text matchText(tword1,tword) but I just relized that it is also selecting any strings that have that pattern, is there a way to only select exact matches? example tword1= record_id tword = record_id matchtext returns record_id orig_record_id only

Re: matchText

2007-01-21 Thread Gordon Tillman
. For example: matchText(record_id,^record_id$) -- returns true But matchText(orig_record_id,^record_id$) -- returns false The ^ at the start of the regex binds whatever follows to the very beginning of the string. The $ at the end of the regex binds whatever comes before it to the very

RE: matchText

2007-01-21 Thread Robert Mann
Don't think I am getting the syntext correct this is returning nothing matchText(tword1,^tword$) tword1 and tword are both variables Thanks Rob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gordon Tillman Sent: Sunday, January 21, 2007 10:42 AM

Re: matchText

2007-01-21 Thread Gordon Tillman
Howdy Robert, On Jan 21, 2007, at 11:14, Robert Mann wrote: Don't think I am getting the syntext correct this is returning nothing matchText(tword1,^tword$) tword1 and tword are both variables Yep for the second argument to the matchText() function, you need to construct the regular

Re: Matchtext script results

2006-12-01 Thread Dick Kriesel
On 11/30/06 3:07 PM, J. Landman Gay [EMAIL PROTECTED] wrote: And that is what surprised me -- that no tinkering with arrays, or matchtext, or anything else is faster than the most straightforward Revolution syntax. At least that's true for your sample data. If the word list were very long

Re: Matchtext script results

2006-12-01 Thread John Craig
Jeez! Did the office lights dim and flicker when you ran the regex version? :-0 Mark Smith -- native syntax: 18 ticks. Found 2 matches Mark Smith -- filter: 18 ticks. Found 2 matches Mark Smith -- array: 15 ticks. Found 2 matches Dick Kriesel -- array: 8 ticks. Found 1 match John Craig --

Re: Matchtext script results

2006-12-01 Thread J. Landman Gay
John Craig wrote: Jeez! Did the office lights dim and flicker when you ran the regex version? No, but I was testing during the daytime so it was hard to tell. :) I am pretty sure it was slower because of the complex structure of the pattern, but it was still cool that you could write it.

Re: Matchtext script results

2006-11-30 Thread Jim Ault
On 11/30/06 3:54 PM, Mark Smith [EMAIL PROTECTED] wrote: Not that it necessarily matters for your application, but your version will miss a match if it's preceded or followed by punctuation -- cat. (dinosaur) etc. By an unnecessary process of elimination, I arrived at just about exactly

Re: Matchtext script results

2006-11-30 Thread J. Landman Gay
Mark Smith wrote: Not that it necessarily matters for your application, but your version will miss a match if it's preceded or followed by punctuation -- cat. (dinosaur) etc. I cheated by not telling everything. I decided after all this to do a string search, so punctuation and plurals

Re: Matchtext script results

2006-11-30 Thread J. Landman Gay
Robert Brenstein wrote: And that is what surprised me -- that no tinkering with arrays, or matchtext, or anything else is faster than the most straightforward Revolution syntax. I was thinking this would take a long time, but in fact it is the fastest way to do it (that I've seen so far

Matchtext to find a series of words

2006-11-29 Thread J. Landman Gay
I need a matchtext/regex that will find a series of words in a block of text, no matter whether they are together or not, and ignoring carriage returns. For example: See if all of these words: dog cat dinosaur are in this text: The purple dinosaur inadvertently stepped on the cat.cr

Matchtext to find a series of words

2006-11-29 Thread J. Landman Gay
I need a matchtext/regex that will find a series of words in a block of text, no matter whether they are together or not, and ignoring carriage returns. For example: See if all of these words: dog cat dinosaur are in this text: The purple dinosaur inadvertently stepped on the cat.cr The white

Matchtext for multiple words

2006-11-29 Thread J. Landman Gay
Sorry if this comes through twice, I'm having trouble sending to the list. I need a matchtext/regex that will tell me if all supplied words exist in a block of text, regardless of their order, and ignoring carriage returns. For example, see if all these words: dog dinosaur cat exist

Re: Matchtext to find a series of words

2006-11-29 Thread Ken Ray
On 11/29/06 3:26 PM, J. Landman Gay [EMAIL PROTECTED] wrote: I need a matchtext/regex that will find a series of words in a block of text, no matter whether they are together or not, and ignoring carriage returns. For example: See if all of these words: dog cat dinosaur are in this text

Re: Matchtext for multiple words

2006-11-29 Thread Mark Smith
Do you really need to do it with MatchText? Aren't is in, is among the words of etc going to work? Or do you really need it to be a one- liner? Best, Mark ps. That's the third one ;-0 On 29 Nov 2006, at 21:39, J. Landman Gay wrote: Sorry if this comes through twice, I'm having trouble

Re: Matchtext for multiple words

2006-11-29 Thread Eric Chatonet
, it should be very fast... Le 29 nov. 06 à 22:39, J. Landman Gay a écrit : Sorry if this comes through twice, I'm having trouble sending to the list. I need a matchtext/regex that will tell me if all supplied words exist in a block of text, regardless of their order, and ignoring carriage

Re: Matchtext for multiple words

2006-11-29 Thread Brian Yennie
having trouble sending to the list. I need a matchtext/regex that will tell me if all supplied words exist in a block of text, regardless of their order, and ignoring carriage returns. For example, see if all these words: dog dinosaur cat exist in this text: The purple dinosaur

Re: Matchtext to find a series of words

2006-11-29 Thread Jim Ault
On 11/29/06 1:26 PM, J. Landman Gay [EMAIL PROTECTED] wrote: I need a matchtext/regex that will find a series of words in a block of text, no matter whether they are together or not, and ignoring carriage returns. For example: See if all of these words: dog cat dinosaur are in this text

Re: Matchtext for multiple words

2006-11-29 Thread J. Landman Gay
Mark Smith wrote: Do you really need to do it with MatchText? Aren't is in, is among the words of etc going to work? Or do you really need it to be a one-liner? Best, Mark ps. That's the third one ;-0 Yeah, I noticed that, and I'm not sure how it happened. I only sent one, then waited

Re: Matchtext for multiple words

2006-11-29 Thread John Craig
- then it would be possible to do a quick 1 liner regex - we can use '\1' to back reference the first match. :-( J. Landman Gay wrote: Sorry if this comes through twice, I'm having trouble sending to the list. I need a matchtext/regex that will tell me if all supplied words exist in a block of text

Re: Matchtext for multiple words

2006-11-29 Thread Ken Ray
On 11/29/06 5:07 PM, J. Landman Gay [EMAIL PROTECTED] wrote: if dinosaur is in tText and dog is in tText and cat is in tText and that would require 3 times the number of lookups over a single matchtext. Plus, it would match paragraphs with catastrophe, doggedly, muscat, etc., which you

Re: Matchtext to find a series of words

2006-11-29 Thread J. Landman Gay
Jim Ault wrote: I would tackle this using the filter command replace cr with tab in textStr set the wholematches to true filter textStr with * token1* filter textStr with * token2* filter textStr with * token3* if textStr is empty then return false else return true A better form would be

Re: Matchtext for multiple words

2006-11-29 Thread Dick Kriesel
On 11/29/06 1:39 PM, J. Landman Gay [EMAIL PROTECTED] wrote: I need a matchtext/regex that will tell me if all supplied words exist in a block of text, regardless of their order, and ignoring carriage returns. For example, see if all these words: dog dinosaur cat exist in this text

Re: Matchtext for multiple words

2006-11-29 Thread John Craig
having trouble sending to the list. I need a matchtext/regex that will tell me if all supplied words exist in a block of text, regardless of their order, and ignoring carriage returns. For example, see if all these words: dog dinosaur cat exist in this text: The purple dinosaur inadvertently

Re: Matchtext to find a series of words

2006-11-29 Thread Brian Yennie
This looks promising, thanks. It looks like there is no single-pass method, but since filter is pretty fast it may do okay. Not sure how robust my stab was, but I do think that algorithmically one-pass is definitely possible. You just need to pass through the text once, and cross off each

Re: Matchtext for multiple words

2006-11-29 Thread J. Landman Gay
if tCurrentWord tTotalWords then put .* after tRegex end if end repeat -- test our regex against the 2 test strings put matchText(tString, tRegex) return matchText(tString2, tRegex) end mouseUp John Craig wrote: I still think it's working ok - someone slap me if I'm wrong

Re: Matchtext for multiple words

2006-11-29 Thread J. Landman Gay
|dog)\b\b(?!\1|\2)(list|house|dog)\b My test then goes through a bunch of text files on disk and applies the regex to the text of each file like this: put matchText(tText, tRegex) into tMatch I don't get any matches though, and my knowledge of regex is too limited for me to know if I'm doing

Re: Matchtext for multiple words

2006-11-29 Thread John Craig
)(list|house|dog)\b My test then goes through a bunch of text files on disk and applies the regex to the text of each file like this: put matchText(tText, tRegex) into tMatch I don't get any matches though, and my knowledge of regex is too limited for me to know if I'm doing something wrong

Re: Matchtext for multiple words

2006-11-29 Thread J. Landman Gay
John Craig wrote: Oops. I meant to say - check the list is passed as list,dog,house (comma separated, and without parenthesis) Yeah, that was the problem. I was altering the scripts from the list so they would fit into my tests and I didn't change yours right. Now that I've made the

Re: Date Validation and MatchText

2005-12-22 Thread Alex Tweedly
Jeff Honken wrote: Thanks for the reply Ken that does work well. I'd like to try to restrict the date to a pattern of mm/dd/. Using date allow dates such as mm/d/y. Do you know how to parse the date string to match mm/dd/ only? The matchText string in your earlier email would

RE: Date Validation and MatchText

2005-12-22 Thread Jeff Honken
Sent: Thursday, December 22, 2005 1:04 PM To: How to use Revolution Subject: Re: Date Validation and MatchText Jeff Honken wrote: Thanks for the reply Ken that does work well. I'd like to try to restrict the date to a pattern of mm/dd/. Using date allow dates such as mm/d/y. Do you know how

Date Valadation and MatchText

2005-12-21 Thread Jeff Honken
trying to check is: mm/dd/ Here's the Code: function CheckDate pDateToCheck if matchText(pDateToCheck,(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])/([0-9][ 0-9][0-9][0-9])) is true then return pDateToCheck else return Bad date end if end CheckDate

Re: Date Valadation and MatchText

2005-12-21 Thread Ken Ray
On 12/21/05 5:33 PM, Jeff Honken [EMAIL PROTECTED] wrote: I've been trying to write some error coding for a text field containing a date. I found some old code that someone wrote in the past but I'm having a hard time figuring out how it's working. I'm trying to get the code so if the Year

matchText handler not found

2005-10-11 Thread Harvey Toyama
Hi, After yesterday's good advice on regex, I wanted to try matchText. My installation (2.5.1) doesn't find the handler. Is there something special about the matchText function. In fact, I don't recall any of the documented functions being found. Perhaps I didn't install correctly

Re: matchText handler not found

2005-10-11 Thread Sarah Reichelt
After yesterday's good advice on regex, I wanted to try matchText. My installation (2.5.1) doesn't find the handler. Is there something special about the matchText function. In fact, I don't recall any of the documented functions being found. matchText is a function, not a handler. If you

Re: matchText handler not found

2005-10-11 Thread Alex Tweedly
Harvey Toyama wrote: Hi, After yesterday's good advice on regex, I wanted to try matchText. My installation (2.5.1) doesn't find the handler. Is there something special about the matchText function. In fact, I don't recall any of the documented functions being found. matchText

RE: matchText handler not found

2005-10-11 Thread Harvey Toyama
, 2005 3:38 PM To: How to use Revolution Subject: Re: matchText handler not found Harvey Toyama wrote: Hi, After yesterday's good advice on regex, I wanted to try matchText. My installation (2.5.1) doesn't find the handler. Is there something special about the matchText function. In fact, I don't

Re: MatchText and PCRE

2005-07-20 Thread David Wilkinson
David Just a couple of points since Mark has already answered very well Frederic Rinaldi's plugin in the rev development/plugin menu is invaluble for testing Rev's regex implementation and porting syntax, if you haven't discovered it Like Mark, I had difficulties with the (?s) switch, though

MatchText and PCRE

2005-07-19 Thread Mark Greenberg
correctly in Rev. I gave up and found another solution to my particular situation. Does a pattern like .* match empty? If not, can it be changed? Yes. Is case-sensitivity in matchText affected by Rev's caseSensitive property? It appears not. Is case sensitivity settable? Case sensitivity

Re: MatchText and PCRE

2005-07-19 Thread David Vaughan
On 20/07/2005, at 10:15, Mark Greenberg [EMAIL PROTECTED] wrote: David, I am by no means an advanced programmer in Rev, but I have been using Regex a lot lately. This is what I have discovered in my use of Regex in Rev: snip I highly recommend the book Mastering Regular

MatchText and PCRE

2005-07-18 Thread David Vaughan
but that will not answer the question of whether those behaviours are modifiable, so I am seeking answers before I dive in to using matchText. Is it greedy? If so, is that reversible and how? Does the dot match newline? If not, can it be made to do so? Does a pattern like .* match empty? If not, can

MatchText error

2004-12-14 Thread Byron
I'm getting the error TypeHandler: can't find handler ObjectTest Match Text LinematchText(Goodbye,bye) HintmatchText I'm testing with the example in the documentation. Any ideas? Here is the exact script on mouseUp matchText(Goodbye,bye) put it end mouseUp Thanks, Byron

Re: MatchText error

2004-12-14 Thread Byron
Thank you. That did it. . . obviously I still have a lot to learn. On Dec 14, 2004, at 12:44 PM, Alex Tweedly wrote: put matchText(Goodbe, bye) ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution

Re: MatchText error

2004-12-14 Thread Alex Tweedly
At 12:36 14/12/2004 -0800, Byron wrote: I'm getting the error TypeHandler: can't find handler ObjectTest Match Text LinematchText(Goodbye,bye) HintmatchText MatchText is a function - try something like put matchText(Goodbe, bye) -- Alex

on using a runtime script block and matchtext.

2004-10-23 Thread Andre Garzia
the string with the RegEx expression, count the occurences of (.*) thus determining how many keys the array will have, then it generates a string/chunk with the following format: put matchText(pText, theRegEx, gInputA[1], gInputA[...], gInputA[n]) into tBool Where n is the number of occurences

matchtext with Regular expression??

2004-07-05 Thread adrian chun
Hi everyone i was wondering if someone can help me with a problem i am trying to read a file ( opening file and reading no problem) but i want my program to extract a string i want to use the transcript language matchtext function with Reular Expression ( REGEX) to search in the file a filepath

Re: Regex (MatchText) speed

2004-06-25 Thread Troy Rollins
On Jun 25, 2004, at 2:43 AM, Ken Ray wrote: For a whole bunch of ways to increase performance, check out Wil Dijkstra's awesome research into increasing script performance: There is some good stuff there... I just went through and removed all of my put i + 1 into i routines. ;-) -- Troy

Re: Regex (MatchText) speed

2004-06-24 Thread Troy Rollins
in the engine. It is sounding to me as though in Rev that might not be the case, and a couple hundred lines of hand parsing may actually be faster than a single line matchText and a bunch of fillable back references. Given Rev's string-based nature, I'm not totally surprised if that is the case

Re: Regex (MatchText) speed

2004-06-24 Thread Brian Yennie
take any input at all. At this point I'm figuring to do this part later tomorrow or Friday, so cast yer votes! ;-) Well, here are a few tips for the bucket: 1) Offset() is the fastest call you've got. Try to avoid lineOffset() or itemOffset() if possible. Contains can also be slower, for some

Re: Regex (MatchText) speed

2004-06-24 Thread Mark Brownell
On Wednesday, June 23, 2004, at 10:39 PM, Troy Rollins wrote: Thanks Mark. I'll look at this. And, while I don't doubt this has provided good results, may I ask why you use it instead of a matchText? You didn't indicate if you had done some form of speed test, or in fact ever compared the two

Re: Regex (MatchText) speed

2004-06-24 Thread Mark Wieder
Mark- Thursday, June 24, 2004, 7:03:48 AM, you wrote: MB You learn something new everyday around here. I didn't know that MB offset() worked faster in caseSensitive to TRUE mode. Hindsight is wonderful. It makes sense, now that I think about it. If caseSensitive were false the engine would have

Regex (MatchText) speed

2004-06-23 Thread Troy Rollins
I took a look through the archives, and didn't see anything definitive about speed advantages in Rev of using matchText with regEx, compared to more basic chunking techniques - including contains. I find Rev is a string handling monster with Transcript alone, but don't know just what

Re: Regex (MatchText) speed

2004-06-23 Thread Richard Gaskin
Troy Rollins wrote: I took a look through the archives, and didn't see anything definitive about speed advantages in Rev of using matchText with regEx, compared to more basic chunking techniques - including contains. I find Rev is a string handling monster with Transcript alone, but don't know

Re: Regex (MatchText) speed

2004-06-23 Thread Mark Brownell
On Wednesday, June 23, 2004, at 06:25 PM, Troy Rollins wrote: Anyone have a real-world sense of the speed difference? I have a parsing routine which I put together hastily, knowing that it would need to be later optimized. I'm edging in on that optimization phase, and I'm wondering what angle

Re: Regex (MatchText) speed

2004-06-23 Thread Troy Rollins
ALL of that with one powerful matchText, but if that only ends up costing me time rather than saving it... -- Troy RPSystems, Ltd. http://www.rpsystems.net ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use

Re: Regex (MatchText) speed

2004-06-23 Thread Mark Brownell
formatting. The first job of my parser is to simply try to determine what the heck it is parsing. I currently have it functional, using if-else ifs, contains, etc. I'm considering replacing ALL of that with one powerful matchText, but if that only ends up costing me time rather than saving it... -- put

Re: Regex (MatchText) speed

2004-06-23 Thread Troy Rollins
On Jun 24, 2004, at 1:08 AM, Mark Brownell wrote: These two functions work with any text for the start spot and any text for the end spot. Thanks Mark. I'll look at this. And, while I don't doubt this has provided good results, may I ask why you use it instead of a matchText? You didn't indicate

Re: Regex (MatchText) speed

2004-06-23 Thread Brian Yennie
Troy, My 2 cents- it totally depends on what kind of RegEx you're ending up with. RegEx buys you power for expressing complex rules. A hand crafted solution will almost always run faster, it's just a matter of whether you can afford to write new code for every case instead of just

Matchtext

2003-07-31 Thread Yves COPPE
in textToSearch if matchtext(theLine,(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0- 9]),theDay,TheMonth,TheYear) is true then put theLine cr after tresult end if end repeat delete last char of tresult return tresult end searchDate BUT I see in my text, some dates are dd/mm/

Re: Matchtext

2003-07-31 Thread Dar Scott
On Thursday, July 31, 2003, at 07:18 AM, Yves COPPE wrote: if matchtext(theLine,(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0- 9]),theDay,TheMonth,TheYear) is true then Try this: ([ 0][1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0-9]) This will include the space in theDay

Re: Matchtext

2003-07-31 Thread Alex Rice
On Thursday, July 31, 2003, at 10:39 AM, Dar Scott wrote: On Thursday, July 31, 2003, at 07:18 AM, Yves COPPE wrote: if matchtext(theLine,(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0-9][0- 9]),theDay,TheMonth,TheYear) is true then Try this: ([ 0][1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0

Re: Matchtext

2003-07-31 Thread Steve Gehlbach
Alex Rice wrote: put matchText(tLine, (\d{1,2})/(\d{1,2})/(\d{2,4}), tDay, tMo, tYr) ?? Although the \d and {m,n} syntax is standard regexp well documented in Perl, I did not see this in the Rev Regular Expression Syntax page. Do I have bad eyes or is this not documented (maybe Rev

Re: Matchtext

2003-07-31 Thread Yves COPPE
Le jeudi, 31 juil 2003, à 18:58 Europe/Brussels, Alex Rice a écrit : On Thursday, July 31, 2003, at 10:39 AM, Dar Scott wrote: On Thursday, July 31, 2003, at 07:18 AM, Yves COPPE wrote: if matchtext(theLine,(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/([0- 9][0-9]),theDay,TheMonth,TheYear

Re: Matchtext

2003-07-31 Thread Dar Scott
On Thursday, July 31, 2003, at 11:42 AM, Steve Gehlbach wrote: Alex Rice wrote: put matchText(tLine, (\d{1,2})/(\d{1,2})/(\d{2,4}), tDay, tMo, tYr) ?? Although the \d and {m,n} syntax is standard regexp well documented in Perl, I did not see this in the Rev Regular Expression Syntax page

Re: Matchtext

2003-07-31 Thread Dar Scott
On Thursday, July 31, 2003, at 10:58 AM, Alex Rice wrote: Here is one that handles different lengths for the digits, but doesn't check the ranges of the day and month numbers. But that could be done in transcript. put matchText(tLine, (\d{1,2})/(\d{1,2})/(\d{2,4}), tDay, tMo, tYr) I like

  1   2   >