String searching algorithms in Java

前端 未结 5 2076
不知归路
不知归路 2021-01-01 07:29

I am doing string matching with big amount of data.

EDIT: I am matching words contained in a big list with some ontology text files. I take each file from ontology,

5条回答
  •  悲哀的现实
    2021-01-01 08:21

    Regular expressions are definitely your best bet. They can be a little bit messy to write, but they're the only way that you can have a looser matching without having an incomprehensible series of if/else or switch statements.

    Plus, they'll be a lot faster than the alternative.

提交回复
热议问题