Author |
Message
|
SDS |
Posted: Wed Jun 15, 2011 1:05 am Post subject: URGENT-WMB:Regular Expression for Data pattern in MessageSet |
|
|
 Apprentice
Joined: 13 Jun 2011 Posts: 47
|
Hi,
I am having a little experience in WMB. Currently working in WMB7.0.0.2 & got stuck with a problem.
I need to give a regular expression in the data pattern field for a message set definition file to validate a message in hex format.
The condition is the data pattern should validate the hex message string having double quote (") only in start & end of the string. Also it should not give any parsing error if any double quote (") comes in the middle of the string.
Please help me out. Thanks in advance. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jun 16, 2011 1:35 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
I can help, but I need more information first...
Please can you give more details about what your message flow is doing. Are you parsing a CSV ( comma-separated values ) message? If not, please describe the data format, and provide an example if possible. |
|
Back to top |
|
 |
SDS |
Posted: Thu Jun 16, 2011 1:46 am Post subject: |
|
|
 Apprentice
Joined: 13 Jun 2011 Posts: 47
|
Hey Kimbert,
Thanks a lot friend for your approach.
I've done it finally today...  |
|
Back to top |
|
 |
smdavies99 |
Posted: Thu Jun 16, 2011 3:26 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Would you care to share the solution with the rest of us mere mortals?  _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
SDS |
Posted: Fri Jun 17, 2011 1:28 am Post subject: |
|
|
 Apprentice
Joined: 13 Jun 2011 Posts: 47
|
yeah.. why not!
actually my hex input message was huge..
here I'm giving only two strings for example..
String 1=> ":óI::::94:::::::::::"
String 2=> ".:ð:ð:ð:ð::S":™"
likewise, there were several hex strings separated by ','
at first my data pattern was validating the 1st string only and it was failing to parse the 2nd string as it had an extra double quote (") in middle of the string also.
finally, I made the data pattern as
(([^:"])|("[^,:\r])|(",[^"])|("\r[^\n])|("))*
and now it is validating the 2nd string also recognizing the extra double quote in the middle of the string.  |
|
Back to top |
|
 |
|