Replies: 3 comments
-
Thank you for reporting this. I agree, pattern matching should not be limited to '*' and '?' and definitely not implemented manually like this, it should rather be delegated to the Java standard library. I will transform this discussion into an improvement request on the issue tracker. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks Guys, I just noticed this in my inbox. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi All,
I'm working on rewriting a batch process that is quite old.
It processes multiple files which have essentially the same data, but one has an additional text field at the end.
The files are comma separated value (CSV) files.
Without going too far into it, I was under the impression the PatternMatchingCompositeLineMapper would support a full regular expression suite. After all, Java does have a good pattern matching library in the Pattern & Matches and the String classes "matches" functionality which is built over the top of those regular expression tools.
What I have discovered though is that the support for regular expressions is rather limited with '*' stars and '?' question marks.
From reviewing the code it looks like it's a very limited, ant pattern matching capability.
The result is that a solution is very inelegant, requiring a long list of ??? and intermittent * to support possibly unknown length white space values.
Granted, I could write a custom line tokenizer but according to "The Definitive Guide to Spring Batch", that's expanding the separation of concerns for that object and not recommended. My understanding is that the author of that book is also head of the Spring Batch project.
Any chance someone would be willing to implement java.util.Pattern matching functionality?
Beta Was this translation helpful? Give feedback.
All reactions