D
D
Dmitry2016-09-21 13:40:55
Java
Dmitry, 2016-09-21 13:40:55

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

1 answer(s)
A
Alexey, 2016-09-21
@TheKnight

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 question

Ask a Question

731 491 924 answers to any question