English 中文(简体)
如何比较 j中的两条str?
原标题:how to compare two strings in java?

www.un.org/Depts/DGACM/index_spanish.htm 我的形势如下: A <---------->string B

“entergraph

www.un.org/Depts/DGACM/index_spanish.htm 我将A与B相比较,条件如下:

1- if number shown in read is different in both side but the rest is the same it means A = B.

2- 在一些情况中,如A一侧的头一个地区,在红色数字显示后,没有白色空间,而在b边,红外和X之后有白色空间。

3- 也不同案件,如第3类

www.un.org/Depts/DGACM/index_spanish.htm 现在,如何最好地比较这两个方面?

private static void controlSimilarity(String memo,String ck,String bc,String id,String product) {

           if(!id.equals(product)){

            listIdentifier.add(new MmoCnBcIdProduct(memo,ck,bc,id,product));
           }
问题回答

I d 试图“正常化”扼杀。 将“+Xs+”改为“X”,将“s+%”改为“%”,将“s+MG”改为“MG”,然后用白色空间或一些reg(Scanner 或Guava splitter)加以分类,并比较其中一部分。

根据你的抽样数据,我建议通过在每一组数字和果卡之间增加空间,实现每一座标的正常化。 样本2

TASIGNA CAPS 1X200MG  <---->  TASIGNA CAPS 112 X 200 MG

将:

TASIGNA CAPS 1 X 200 MG  <---->  TASIGNA CAPS 112 X 200 MG

现在就在白天分裂,比较单一群体。 两者应相同,但一个数字组。 根据您的数据类型(CAPS,Com, CREME,......),你可能会忽视另一个群体。 无论是在X之前,还是是在CREME之后,等等。 这在很大程度上取决于您的数据。

在海因应建议后,可能遵循<代码>Regex。 可使用:

/(w.*?)(d+)X(w.*)/

第1组和第3组的捕获应在每一间空间消失后平等。


  1. www.un.org/Depts/DGACM/index_french.htm

  2. 比较<代码>[0]和?

  3. 编制所有剩余指数,以便进行单一体积。 (合并前使用<代码>trim)

  4. 使用<代码>等于 ORequisIgnoreCase,以比较组合(次)指示。

  5. 从第1步改为每组护卫。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签