|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Element should not start or end with ':' |
« View previous topic :: View next topic » |
Author |
Message
|
John_peter |
Posted: Thu May 27, 2004 9:16 pm Post subject: Element should not start or end with ':' |
|
|
Novice
Joined: 10 May 2004 Posts: 22
|
How do use the regular expression for the pattern value constraint to impose a restriction that the element should not start or end with a colon?
I can do it at the ESQL level ,but can I not impose that in the message set? |
|
Back to top |
|
 |
rajaram |
Posted: Mon May 31, 2004 6:02 am Post subject: |
|
|
Acolyte
Joined: 02 Jan 2004 Posts: 53
|
Hi,
I am assuming that Colons will always come in the message,
and the data may be like ":data:"
U cannot Ignore the Colons. What u shoud do is store the begining colon in one Element(EL_COL1) in the message and the ending Colon(EL_COL2) in One element in the message and the content between the Colons in Another Variable(Field1).
First Create a Compound Type(CTYPE), with Data Element Separation Property to Data Pattern. Now, Create the elements Described above under this CTYPE in the following order:EL_COL1,FIELD1,EL_COL2. Field1 will contain the Data that u r looking for.
Now, For all the 3 elements, EL_COL1,FIELD1,EL_COL2, use the datapattern at the element level as follows.
fOR EL_COL1,set the data pattern to ':' .
for FIELD1, set the data pattern is [^:]* (this stands for anything until a colon comes)
for EL_COL2, set the data pattern is ':'.
If this is Confusing, Please let me know..
Thanks,
Raja
[/code] |
|
Back to top |
|
 |
John_peter |
Posted: Thu Jun 03, 2004 12:26 am Post subject: |
|
|
Novice
Joined: 10 May 2004 Posts: 22
|
I used this pattern [a-zA-Z0-9/\?\(\)\.,'\+\{\} ]([a-zA-Z0-9/\-\?:\(\)\.,'\+\{\} ]*[^\-])*
and it worked!
Thanks |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|