Re: Regular expression escape characters

2012-03-29 Thread Ken Ray
> The "!" is escaped with the backslash (\) and then the use of {3,} means "3 > of the previous character", so: Sorry, {3,} means "3 or MORE of the previous character"… if you only want to match 3 characters, you need to use {3,3}: \!{3,3} Ken Ray Sons of Thunder Software, Inc. Email: k..

Re: Regular expression escape characters

2012-03-29 Thread Ken Ray
On Mar 28, 2012, at 10:19 PM, Bill Vlahos wrote: > I am building a regular expression to find a set of question marks and > exclamation points. For example ??? or !!!. put "This is a !!! test" into tData get matchChunk(tData,"(\!{3,})",tStart,tEnd) put tStart,tEnd --> 11,13 The "!" is escaped

Re: Regular expression escape characters

2012-03-29 Thread Peter M. Brigham, MD
On Mar 28, 2012, at 9:39 AM, I wrote: > I have a bias (often warranted) towards using LC's text and chunking > capabilities rather than LC. If you know that the runs of question marks and > exclamation points will alway be length = 3 then you could avoid Regex: ... Sorry, meant to say "I have a

Re: Regular expression escape characters

2012-03-29 Thread Peter M. Brigham, MD
On Mar 28, 2012, at 11:19 PM, Bill Vlahos wrote: > I am building a regular expression to find a set of question marks and > exclamation points. For example ??? or !!!. > > These are special characters so they mean something to a regular expression. > > How do I find them in the text? > > If I

Re: Regular expression escape characters

2012-03-29 Thread dunbarx
I am not sure if this if feasible, but could you replace the problem char with another, one that does not appear in the original text and has no agenda with regex? When you find the chunk data for the substitutes, you can retranslate that back to the original. So if it is true that "!" is a co

Re: Regular expression escape characters

2012-03-28 Thread Dar Scott
I don't think punctuation are word characters, so the \b might not be working right. Try \!\!\! without the \b and see if that matches something. If it does, then work on getting the boundary conditions right. -- Dar On Mar 28, 2012, at 9:19 PM, Bill Vlahos wrote: > I am building a regular e