Author |
Message
|
vijayakumar |
Posted: Tue Jun 12, 2012 5:59 am Post subject: Finding month pattern in string |
|
|
Centurion
Joined: 01 Aug 2010 Posts: 101
|
How to find a monthYear pattern in string.
For example :
need to find a MMMYY Pattern(NOV12, JAN11) in a string .
How to achieve this. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jun 12, 2012 6:04 am Post subject: Re: Finding month pattern in string |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
vijayakumar |
Posted: Tue Jun 12, 2012 6:17 am Post subject: |
|
|
Centurion
Joined: 01 Aug 2010 Posts: 101
|
If i want to get a particular value using any constant delimiter i.e character , i can use the code.
But in my string , i need to find the values based on MMMYY pattern.
The value of the pattern is something like JAN12 similar to this. It s not the constant value. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue Jun 12, 2012 6:18 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
vijayakumar wrote: |
If i want to get a particular value using any constant delimiter i.e character , i can use the code.
But in my string , i need to find the values based on MMMYY pattern.
The value of the pattern is something like JAN12 similar to this. It s not the constant value. |
Then you have to write your code to test for all possible combinations. Its not that hard, there are only twelve months in the year. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
kimbert |
Posted: Tue Jun 12, 2012 6:23 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
You have not told us *why* you want to do this. It is quite likely that you will get answers that are factually accurate, but not the correct solution to your ( not properly described ) problem.
One question to think about: why are you not using the MRM parser for this ( or the DFDL parser if you are on v8 )? |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Jun 12, 2012 6:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
vijayakumar wrote: |
If i want to get a particular value using any constant delimiter i.e character , i can use the code.
But in my string , i need to find the values based on MMMYY pattern.
The value of the pattern is something like JAN12 similar to this. It s not the constant value. |
You can continue to waste your own time by reposting a description of the problem you are asking us to solve for you for free.
Or you can spend your own time PRODUCTIVELY reading the production documentation on relevant topics, and then spend your own time PRODUCTIVELY by testing things.
Then if you don't solve it yourself, you can come back and show what you've read and explain what you've tried. And you'll get a much better answer. |
|
Back to top |
|
 |
|