Answer the question
In order to leave comments, you need to log in
How to quickly parse text in Java?
Greetings. I am making an application in which I need to check a lot of different matches of a string with a template. For example, check the incoming string for a substring or the content of numbers there, or count the number of lines or characters, in general, do everything possible with the text. As a result, you just need to get a boolean.
What can be done quickly and easily? Maybe there is a special one? It is clear that you can write a method and parse it using regular expressions, but still ....
Answer the question
In order to leave comments, you need to log in
The task is poorly formalized.
Questions:
1) What are the performance requirements? Line size, lines per second, etc. If the requirements are not very high, you may be satisfied with regular regular expressions.
2) How often do audit requirements change? If rare, it makes sense to write a number of classes, each of which will be specified for a specific task.
3) If the requirements change often, but are only added, leaving the previous requirements necessary for execution - what does not suit the solution with the generation of the verification code on the fly?
I recommend reading about algorithms for working with strings.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question