need more info...
Is it possible to have nested mixed punctuation like blah (other] blah [oops) or do they all match a simple pattern? Can they end with {[( ? or the like?
You should be able to make a single rule that says anything followed by one character in the list of {{( followed by (anything? a pattern? what makes sense here) and ends in one character from the list of ]})
That may not be sufficient for all cases or may even fail on some cases depending on the actual data patterns.
Then you need to replace {{( with [ and the same for ] maybe ?? or extract from there the portion you wanted?
The real catch is just whether the simple rule is sufficient for your data.
--- Some tasks may or may not make sense to do other ways. If I wanted the data in between two brackets, I would pull it out in a transformer.
PAL - How to pick up the text between the brackets []
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 161
- Joined: Mon Mar 17, 2008 10:33 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Thank you for posting complete solution.
Note that yours will pick up **[text) for example (mismatched brackets).
But if you are 100% sure that the brackets will always be matched, then your solution will suffice. Otherwise you need a pattern with OR operators.
Note that yours will pick up **[text) for example (mismatched brackets).
But if you are 100% sure that the brackets will always be matched, then your solution will suffice. Otherwise you need a pattern with OR operators.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 161
- Joined: Mon Mar 17, 2008 10:33 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: