Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

[OT] Esoteric RegEx Code Examples (Real Studio getting started Mailinglist archive)

Back to the thread list
Previous thread: Help please: ParseDate in RB2007R1
Next thread: Two questions


RB Database   -   tom.russell transport.alstom.com
  [OT] Esoteric RegEx Code Examples   -   Chuck Pelto
   Re: [OT] Esoteric RegEx Code Examples   -   Bill Marcy
   Re: [OT] Esoteric RegEx Code Examples   -   Mark Davis
   Re: [OT] Esoteric RegEx Code Examples   -   Jack Dolby
   Re: [OT] Esoteric RegEx Code Examples   -   Charles Yeomans
   Re: [OT] Esoteric RegEx Code Examples   -   Ed Shuler
   Re: [OT] Esoteric RegEx Code Examples   -   Chuck Pelto

[OT] Esoteric RegEx Code Examples
Date: 10.02.07 18:54 (Sat, 10 Feb 2007 10:54:36 -0700)
From: Chuck Pelto
Greetings,

Where can I find a good site to go to for advice on how to code a
RegEx request that will allow for double-quotation marks while
excluding any that are preceded by a symbol indicating an ESCAPE
character?

Regards,

Chuck
_______________________________________________
Unsubscribe:
<<email address removed>>

REAL Software has decided to consolidate this mailing list with the online Forums. On Monday, February 12, 2007, this mailing list will no longer be active. We encourage you to continue your REALbasic and REAL SQL Server discussions on the Forums. If you are not presently a member of the forum, please sign up today at <http://forums.realsoftware.com>.

Re: [OT] Esoteric RegEx Code Examples
Date: 10.02.07 18:56 (Sat, 10 Feb 2007 12:56:45 -0500)
From: Bill Marcy
http://www.rblibrary.com has a couple of great articles.


On Feb 10, 2007, at 12:54 PM, Chuck Pelto wrote:

> Greetings,
>
> Where can I find a good site to go to for advice on how to code a
> RegEx request that will allow for double-quotation marks while
> excluding any that are preceded by a symbol indicating an ESCAPE
> character?
>
> Regards,
>
> Chuck
> _______________________________________________
> Unsubscribe:
> <<email address removed>>
> REAL Software has decided to consolidate this mailing list with the
> online Forums. On Monday, February 12, 2007, this mailing list
> will no longer be active. We encourage you to continue your
> REALbasic and REAL SQL Server discussions on the Forums. If you
> are not presently a member of the forum, please sign up today at
> <http://forums.realsoftware.com>.

_______________________________________________
Unsubscribe:
<<email address removed>>

REAL Software has decided to consolidate this mailing list with the online Forums. On Monday, February 12, 2007, this mailing list will no longer be active. We encourage you to continue your REALbasic and REAL SQL Server discussions on the Forums. If you are not presently a member of the forum, please sign up today at <http://forums.realsoftware.com>.

Re: [OT] Esoteric RegEx Code Examples
Date: 11.02.07 00:07 (Sun, 11 Feb 2007 10:07:09 +1100)
From: Mark Davis
Hi Chuck,

I've found the RB Doco for RegEx to be good, but if something isn't in it,
then you can always go to the 'source' of RB's RegEx.

http://www.pcre.org/

If you follow the documentation link to the text file version of the pcre
man page, i suggest scrolling down to the Backslash section, specifically
"Non-printing characters" section for your escape code.

- Mark

On Sun, 11 Feb 2007 04:54:36 +1100, Chuck Pelto <<email address removed>> wrote:

> Greetings,
>
> Where can I find a good site to go to for advice on how to code a RegEx
> request that will allow for double-quotation marks while excluding any
> that are preceded by a symbol indicating an ESCAPE character?
>
> Regards,
>
> Chuck
> _______________________________________________
> Unsubscribe:
> <<email address removed>>
> REAL Software has decided to consolidate this mailing list with the
> online Forums. On Monday, February 12, 2007, this mailing list will no
> longer be active. We encourage you to continue your REALbasic and REAL
> SQL Server discussions on the Forums. If you are not presently a member
> of the forum, please sign up today at <http://forums.realsoftware.com>.

_______________________________________________
Unsubscribe:
<<email address removed>>

REAL Software has decided to consolidate this mailing list with the online Forums. On Monday, February 12, 2007, this mailing list will no longer be active. We encourage you to continue your REALbasic and REAL SQL Server discussions on the Forums. If you are not presently a member of the forum, please sign up today at <http://forums.realsoftware.com>.

Re: [OT] Esoteric RegEx Code Examples
Date: 11.02.07 11:46 (Sun, 11 Feb 2007 05:46:06 -0500)
From: Jack Dolby
You might look at <http://regexlib.com/default.aspx>

jack

On 2/10/07 12:54 PM, "Chuck Pelto" <<email address removed>> wrote:

> Greetings,
>
> Where can I find a good site to go to for advice on how to code a
> RegEx request that will allow for double-quotation marks while
> excluding any that are preceded by a symbol indicating an ESCAPE
> character?
>
> Regards,
>
> Chuck
> _______________________________________________
> Unsubscribe:
> <<email address removed>>
> REAL Software has decided to consolidate this mailing list with the online
> Forums. On Monday, February 12, 2007, this mailing list will no longer be
> active. We encourage you to continue your REALbasic and REAL SQL Server
> discussions on the Forums. If you are not presently a member of the forum,
> please sign up today at <http://forums.realsoftware.com>.

Re: [OT] Esoteric RegEx Code Examples
Date: 11.02.07 16:56 (Sun, 11 Feb 2007 10:56:12 -0500)
From: Charles Yeomans

On Feb 10, 2007, at 12:54 PM, Chuck Pelto wrote:

> Greetings,
>
> Where can I find a good site to go to for advice on how to code a
> RegEx request that will allow for double-quotation marks while
> excluding any that are preceded by a symbol indicating an ESCAPE
> character?

I'd suggest the REALbasic mailing lists. We'd need a little more
information about the regular expression you're trying to write.

Charles Yeomans
_______________________________________________
Unsubscribe:
<<email address removed>>

REAL Software has decided to consolidate this mailing list with the online Forums. On Monday, February 12, 2007, this mailing list will no longer be active. We encourage you to continue your REALbasic and REAL SQL Server discussions on the Forums. If you are not presently a member of the forum, please sign up today at <http://forums.realsoftware.com>.

Re: [OT] Esoteric RegEx Code Examples
Date: 11.02.07 17:38 (Sun, 11 Feb 2007 09:38:24 -0700)
From: Ed Shuler
Try
http://wiki.tcl.tk/989
http://www.lugaru.com/man/Regular.Expression.Examples.html
http://www.silverstones.com/thebat/Regex.html

es


On Feb 11, 2007, at 8:56 AM, Charles Yeomans wrote:

>
> On Feb 10, 2007, at 12:54 PM, Chuck Pelto wrote:
>
>> Greetings,
>>
>> Where can I find a good site to go to for advice on how to code a
>> RegEx request that will allow for double-quotation marks while
>> excluding any that are preceded by a symbol indicating an ESCAPE
>> character?
>
> I'd suggest the REALbasic mailing lists. We'd need a little more
> information about the regular expression you're trying to write.
>
> Charles Yeomans
> _______________________________________________
> Unsubscribe:
> <<email address removed>>
> REAL Software has decided to consolidate this mailing list with the
> online Forums. On Monday, February 12, 2007, this mailing list
> will no longer be active. We encourage you to continue your
> REALbasic and REAL SQL Server discussions on the Forums. If you
> are not presently a member of the forum, please sign up today at
> <http://forums.realsoftware.com>.

Ed Shuler
"Unix for power; Macintosh for productivity; Windows for solitaire"

_______________________________________________
Unsubscribe:
<<email address removed>>

REAL Software has decided to consolidate this mailing list with the online Forums. On Monday, February 12, 2007, this mailing list will no longer be active. We encourage you to continue your REALbasic and REAL SQL Server discussions on the Forums. If you are not presently a member of the forum, please sign up today at <http://forums.realsoftware.com>.

Re: [OT] Esoteric RegEx Code Examples
Date: 12.02.07 17:16 (Mon, 12 Feb 2007 09:16:38 -0700)
From: Chuck Pelto
Morning Charles,

On Feb 11, 2007, at 8:56 AM, Charles Yeomans wrote:

>
> On Feb 10, 2007, at 12:54 PM, Chuck Pelto wrote:
>
>> Greetings,
>>
>> Where can I find a good site to go to for advice on how to code a
>> RegEx request that will allow for double-quotation marks while
>> excluding any that are preceded by a symbol indicating an ESCAPE
>> character?
>
> I'd suggest the REALbasic mailing lists. We'd need a little more
> information about the regular expression you're trying to write.

I'm trying to write a RegEx call that will identify text between
pairs of doube-quotation marks, excluding any such mark that is
preceded by an ESCAPE character. The ESCAPE character, for the sake
of discussion, is the backwards slash (\) character.

Therefore, in a string of text from and EditField that reads as follows:

This is a test by "Chuck Pelto" for "Susan Pelto" done in "\"Olde\"
English"

It would find the following items:

[1] "Chuck Pelto"
[2] "Susan Pelto"
[3] ""Olde" English"

I've got the part of getting the stuff between double-quotation marks
working. It reads as follows:

// method to test aspects of Regular Expressions

dim rg as New RegEx
dim theMatch as RegExMatch

dim strInput as string
dim strQuots as string
dim srchPatt as string

dim iCount as integer
dim i as integer

iCount = 0

strInput = EditField1.text

srchPatt = chr(34) + ".*?" + chr(34) // HERE is the pattern that
looks for text between double-quotation marks in a non-greedy manner

rg.SearchPattern = srchPatt

theMatch = rg.Search(strInput)

while theMatch<> nil
iCount = iCount + 1
strQuots = theMatch.subExpressionString(0)
theMatch = rg.search()
wend


What I need now is to figure out how to get it to exclude double-
quotation marks that are preceded by the ESCAPE character (\).

I'm learning how to do this using TextWrangler.

I'm toying around with the following variation on the basic search
pattern.....

srchPatt = chr(34) + ".*?" + chr(34) + "[^(\")]"

Do you think THAT would work?

Regards,

Chuck


_______________________________________________
Unsubscribe:
<<email address removed>>

REAL Software has decided to consolidate this mailing list with the online Forums. On Monday, February 12, 2007, this mailing list will no longer be active. We encourage you to continue your REALbasic and REAL SQL Server discussions on the Forums. If you are not presently a member of the forum, please sign up today at <http://forums.realsoftware.com>.