From: Sascha Effert on 10 Jul 2010 05:33 So my Problem is, that I have to build an API which gives the User of the API the ability to select entries by any kind of language. It is not important for me if the language is awk or just regular expressions, it just has to hold for all my use cases. I think not that lucene gives me such an language, so I think I will have to implement my own language knowing regular expressions and which can handle int values. Or is there perhaps a way to handle the int ranges only by regular expressions? bests Sascha Effert
From: Lew on 10 Jul 2010 10:15 On 07/10/2010 05:33 AM, Sascha Effert wrote: > So my Problem is, that I have to build an API which gives the User of > the API the ability to select entries by any kind of language. It is > not important for me if the language is awk or just regular > expressions, it just has to hold for all my use cases. I think not > that lucene gives me such an language, so I think I will have to > implement my own language knowing regular expressions and which can > handle int values. Or is there perhaps a way to handle the int ranges > only by regular expressions? The question on the table that you have not answered is why Java is not suitable. -- Lew
From: Simon Brooke on 11 Jul 2010 11:48 On Sat, 10 Jul 2010 10:15:42 -0400, Lew wrote: > On 07/10/2010 05:33 AM, Sascha Effert wrote: >> So my Problem is, that I have to build an API which gives the User of >> the API the ability to select entries by any kind of language. It is >> not important for me if the language is awk or just regular >> expressions, it just has to hold for all my use cases. I think not that >> lucene gives me such an language, so I think I will have to implement >> my own language knowing regular expressions and which can handle int >> values. Or is there perhaps a way to handle the int ranges only by >> regular expressions? > > The question on the table that you have not answered is why Java is not > suitable. Go easy on the guy. He's posting from Germany but he writes English as though his first language is French - in any case, his first language is not English! So, Sascha, first, as everyone is saying, there's good regexp handling in Java and everything else you need for general purpose programming, so an idiomatic Java solution is probably the best answer. Converting jawk to play nicely as an embedded filter would be a major exercise - but it would be a good learning exercise, and, if you contributed your solution back, a good thing for the community. You could do this. However, unless you have a lot of spare time, I would not recommend it. -- ;; Semper in faecibus sumus, sole profundam variat
From: Lew on 11 Jul 2010 12:30 Lew wrote: >> The question on the table that you have not answered is why Java is not >> suitable. Simon Brooke wrote: > Go easy on the guy. He's posting from Germany but he writes English as > though his first language is French - in any case, his first language is > not English! How is that relevant? No one is faulting his English. > So, Sascha, first, as everyone is saying, there's good regexp handling in > Java and everything else you need for general purpose programming, so an > idiomatic Java solution is probably the best answer. Go easy on the guy. His first language is not English! -- Lew
From: steph on 11 Jul 2010 17:48 Sascha Effert wrote: > So my Problem is, that I have to build an API which gives the User of > the API the ability to select entries by any kind of language. It is > not important for me if the language is awk or just regular > expressions, it just has to hold for all my use cases. I think not > that lucene gives me such an language, so I think I will have to > implement my own language knowing regular expressions and which can > handle int values. Or is there perhaps a way to handle the int ranges > only by regular expressions? > > bests > > Sascha Effert Awk and Regexp are not two different ways to filter. But Awk use regexp to filer lines and perform action. Awk is a programmation language. If you want your users to be able to get keys from a pattern, you shoud use java.util.regex.Pattern which implement a very common form of regext similar to that used by Perl.
First
|
Prev
|
Pages: 1 2 Prev: help needed with custom drawing in SWT.Tree Next: Array of ArrayLists problem |