Midly OT: SQL Regex Patterns

R

rowe_newsgroups

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
 
G

Guest

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.
 
R

rowe_newsgroups

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


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
 
G

Guest

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.
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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top