ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Regular expression in ESQL

Post new topic  Reply to topic
 Regular expression in ESQL « View previous topic :: View next topic » 
Author Message
mqpaul
PostPosted: Fri Feb 01, 2008 4:46 am    Post subject: An alternative Reply with quote

Acolyte

Joined: 14 Jan 2008
Posts: 66
Location: Hursley, UK

This doesn't answer the question, but one way to achieve that sort of processing could be to use a JavaCompute node and the java.util.regex package. Its regex language is documented in the Java JDK 1.5 javadoc for java.util.regex.Pattern.
_________________
Paul
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Feb 01, 2008 4:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

This is actually a response to:

http://www.mqseries.net/phpBB2/viewtopic.php?t=41654

Which I split from the circa-2002 post it was put on,but clearly not quickly enough (or too quickly!)
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
DaveCanto
PostPosted: Fri Feb 01, 2008 5:57 am    Post subject: Reply with quote

Novice

Joined: 01 Feb 2008
Posts: 11
Location: Belgium - EU

This is my original question:

DaveCanto wrote:
I'm asking myself: "Is it possible to use regular expressions in the ESQL-code of a Compute-node?"

This would be a very powerful feature of the broker. Today you can use regular expressions only when defining a message set to extract different data fields in an intelligent way. Instead of using always the same build-in string functions (like SUBSTRING / REPLACE / LEFT / RIGHT ... ) I would like to use regex for this.

Maybe this can be a feature request for the next version of the broker?!


Mqpaul, the JavaCompute node you mention here, is this the standard Compute-node included in the Message Brokers Toolkit v5.1.0? Or is it a custom-made node you developped yourself? Where do I find more info about extending the toolkit with extra Java-packages?
_________________
Do not underestimate the power of ... unit testing and continuous integration.
Back to top
View user's profile Send private message Visit poster's website
jefflowrey
PostPosted: Fri Feb 01, 2008 6:07 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Java added RegEx support in JDK 1.4.

So it's built into both JDK 1.4 and 1.5 - both of which are supported by WMB v6 - and 1.5 is supported by WMB v6.1.

One could then write a static Java procedure and wrap that in an ESQL procedure call.

That said... it's better to do as much parsing using pre-supplied parsers as possible - so that you keep the physical represenation of the data separate from the logical transformation.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
chrisc
PostPosted: Sun Feb 03, 2008 4:42 pm    Post subject: Reply with quote

Voyager

Joined: 19 Mar 2006
Posts: 77

I always liked the quote (I don't know the source, sorry) -

"Someone who looks at a problem and thinks 'I could use regular expressions to solve that!' now has two problems."

Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sun Feb 03, 2008 6:17 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

chrisc wrote:
I always liked the quote (I don't know the source, sorry) -

"Someone who looks at a problem and thinks 'I could use regular expressions to solve that!' now has two problems."



The only problems that can't be solved by regular expressions are those that a) can't be solved at all, or b) have to be solved using a context free grammar instead, or c) have to be solved using a Turing machine...


_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
DaveCanto
PostPosted: Mon Feb 04, 2008 7:52 am    Post subject: Reply with quote

Novice

Joined: 01 Feb 2008
Posts: 11
Location: Belgium - EU

Why do regular expressions have to be difficult per definition? There are many useful tools around on the net.

I started to use "The Regulator" from Roy Osherove for building .NET-related regular expressions and so far it does the trick for me. Check it out @ tools.osherove.com and go to "Cool Tools - The Regulator".
_________________
Do not underestimate the power of ... unit testing and continuous integration.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Regular expression in ESQL
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.