PC Review


Reply
Thread Tools Rate Thread

Midly OT: SQL Regex Patterns

 
 
rowe_newsgroups
Guest
Posts: n/a
 
      16th Apr 2007
I am writing a Query Analyzer type program and am running into a
slight problem with Syntax highlighting/coloring. All of the logic
works great, it searches for a regex pattern and colors it the
appropriate color.

The problem is that I am in no way great at Regex, and I am getting
frustrated trying to figure out the appropriate search strings.
Anyways, I was hoping someone might have a link that would show the
regex search patterns for the T-SQL (Sql Server) and PL/SQL (Oracle)
keywords.

Does anybody know of a site that might have this info?

Thanks,

Seth Rowe

 
Reply With Quote
 
 
 
 
Spam Catcher
Guest
Posts: n/a
 
      16th Apr 2007
"rowe_newsgroups" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> I am writing a Query Analyzer type program and am running into a
> slight problem with Syntax highlighting/coloring.


Take a look at Fireball Code editor - it does all this and more already. In
fact, Fireball handles 25+ syntaxes? You can add your own syntax files too.

http://sourceforge.net/projects/dotnetfireball

Fireball is based off of Compona SyntaxBox:

http://www.puzzleframework.com

> The problem is that I am in no way great at Regex, and I am getting
> frustrated trying to figure out the appropriate search strings.
> Anyways, I was hoping someone might have a link that would show the
> regex search patterns for the T-SQL (Sql Server) and PL/SQL (Oracle)
> keywords.


I'm not sure if a "simple" regular expression would do the trick... In
fact, I would guess such parsing would require a very complex expression.
 
Reply With Quote
 
rowe_newsgroups
Guest
Posts: n/a
 
      16th Apr 2007
On Apr 16, 3:44 pm, Spam Catcher <spamhoney...@rogers.com> wrote:
> "rowe_newsgroups" <rowe_em...@yahoo.com> wrote innews:(E-Mail Removed):
>
> > I am writing a Query Analyzer type program and am running into a
> > slight problem with Syntax highlighting/coloring.

>
> Take a look at Fireball Code editor - it does all this and more already. In
> fact, Fireball handles 25+ syntaxes? You can add your own syntax files too.
>
> http://sourceforge.net/projects/dotnetfireball
>
> Fireball is based off of Compona SyntaxBox:
>
> http://www.puzzleframework.com
>
> > The problem is that I am in no way great at Regex, and I am getting
> > frustrated trying to figure out the appropriate search strings.
> > Anyways, I was hoping someone might have a link that would show the
> > regex search patterns for the T-SQL (Sql Server) and PL/SQL (Oracle)
> > keywords.

>
> I'm not sure if a "simple" regular expression would do the trick... In
> fact, I would guess such parsing would require a very complex expression.


Thanks for the links. I'm still running through the files, but at
first glance it seems only the dlls for fireball are available, and
not the source code for them.

> I'm not sure if a "simple" regular expression would do the trick... In
> fact, I would guess such parsing would require a very complex expression.


Fortunately, this is an application for my personal use (I'm sick of
switching between Query Analyzer and Sql+) so perfect syntax
highlighting isn't critical. I'm slowly working through the regex
parts - I was simply getting tired of using trial and error to get the
correct results. The good news is I have the basic keywords finished,
now it's just the more complicated expressions that I need to work
out.

Thanks Again!

Seth Rowe

 
Reply With Quote
 
Spam Catcher
Guest
Posts: n/a
 
      17th Apr 2007
"rowe_newsgroups" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):

> On Apr 16, 3:44 pm, Spam Catcher <spamhoney...@rogers.com> wrote:
>> "rowe_newsgroups" <rowe_em...@yahoo.com> wrote
>> innews:(E-Mail Removed):
>>
>> > I am writing a Query Analyzer type program and am running into a
>> > slight problem with Syntax highlighting/coloring.

>>
>> Take a look at Fireball Code editor - it does all this and more
>> already. In fact, Fireball handles 25+ syntaxes? You can add your own
>> syntax files too.
>>
>> http://sourceforge.net/projects/dotnetfireball
>>
>> Fireball is based off of Compona SyntaxBox:
>>
>> http://www.puzzleframework.com
>>
>> > The problem is that I am in no way great at Regex, and I am getting
>> > frustrated trying to figure out the appropriate search strings.
>> > Anyways, I was hoping someone might have a link that would show the
>> > regex search patterns for the T-SQL (Sql Server) and PL/SQL
>> > (Oracle) keywords.

>>
>> I'm not sure if a "simple" regular expression would do the trick...
>> In fact, I would guess such parsing would require a very complex
>> expression.

>
> Thanks for the links. I'm still running through the files, but at
> first glance it seems only the dlls for fireball are available, and
> not the source code for them.


They're both open source packages ... so the source code is available.

>> I'm not sure if a "simple" regular expression would do the trick...
>> In fact, I would guess such parsing would require a very complex
>> expression.

>
> Fortunately, this is an application for my personal use (I'm sick of
> switching between Query Analyzer and Sql+) so perfect syntax
> highlighting isn't critical. I'm slowly working through the regex
> parts - I was simply getting tired of using trial and error to get the
> correct results. The good news is I have the basic keywords finished,
> now it's just the more complicated expressions that I need to work
> out.


Try downloading Expresso - it's a great Regular Expression tester. It's
built with .NET, so it uses the same regex parser as your .NET code
would :-)

http://www.ultrapico.com/Expresso.htm

Best part, it's free!
 
Reply With Quote
 
rowe_newsgroups
Guest
Posts: n/a
 
      17th Apr 2007
On Apr 17, 1:19 am, Spam Catcher <spamhoney...@rogers.com> wrote:
> "rowe_newsgroups" <rowe_em...@yahoo.com> wrote innews:(E-Mail Removed):
>
>
>
> > On Apr 16, 3:44 pm, Spam Catcher <spamhoney...@rogers.com> wrote:
> >> "rowe_newsgroups" <rowe_em...@yahoo.com> wrote
> >> innews:(E-Mail Removed):

>
> >> > I am writing a Query Analyzer type program and am running into a
> >> > slight problem with Syntax highlighting/coloring.

>
> >> Take a look at Fireball Code editor - it does all this and more
> >> already. In fact, Fireball handles 25+ syntaxes? You can add your own
> >> syntax files too.

>
> >>http://sourceforge.net/projects/dotnetfireball

>
> >> Fireball is based off of Compona SyntaxBox:

>
> >>http://www.puzzleframework.com

>
> >> > The problem is that I am in no way great at Regex, and I am getting
> >> > frustrated trying to figure out the appropriate search strings.
> >> > Anyways, I was hoping someone might have a link that would show the
> >> > regex search patterns for the T-SQL (Sql Server) and PL/SQL
> >> > (Oracle) keywords.

>
> >> I'm not sure if a "simple" regular expression would do the trick...
> >> In fact, I would guess such parsing would require a very complex
> >> expression.

>
> > Thanks for the links. I'm still running through the files, but at
> > first glance it seems only the dlls for fireball are available, and
> > not the source code for them.

>
> They're both open source packages ... so the source code is available.
>
> >> I'm not sure if a "simple" regular expression would do the trick...
> >> In fact, I would guess such parsing would require a very complex
> >> expression.

>
> > Fortunately, this is an application for my personal use (I'm sick of
> > switching between Query Analyzer and Sql+) so perfect syntax
> > highlighting isn't critical. I'm slowly working through the regex
> > parts - I was simply getting tired of using trial and error to get the
> > correct results. The good news is I have the basic keywords finished,
> > now it's just the more complicated expressions that I need to work
> > out.

>
> Try downloading Expresso - it's a great Regular Expression tester. It's
> built with .NET, so it uses the same regex parser as your .NET code
> would :-)
>
> http://www.ultrapico.com/Expresso.htm
>
> Best part, it's free!


Thanks! I'll do that.

Thanks,

Seth Rowe

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Regex Patterns Geoff K Microsoft Excel Programming 1 18th Oct 2009 03:08 PM
Is there a good way to turn regex patterns into properly-escaped c# regex patterns? sherifffruitfly Microsoft C# .NET 3 11th Feb 2007 10:56 AM
Regex - Finds one match for repeating patterns =?Utf-8?B?UmFkaW9mbHllcjY1MQ==?= Microsoft Dot NET 1 28th Oct 2005 05:36 PM
RegEx Replacement patterns CodeSponge Microsoft Excel Programming 3 5th Feb 2005 08:39 AM
Can you recommend a book about design patterns? (factory patterns, singleton patterns etc) Joakim Olesen Microsoft Dot NET 4 4th Jan 2005 08:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:59 PM.