使用正则表达式比较2个版本 [英] Compare 2 versions using regular expression
本文介绍了使用正则表达式比较2个版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
hey all
我有一个带有值的字符串数组[例如:1.4.2.5,1.4.25等...]。版本列表,我需要比较和排序该数组。
如何工作。
非常紧急
PraDz
hey all
i have an array of string with values [ex: 1.4.2.5, 1.4.25, etc...]. list of versions and i need to compare and sort that array.
how to work on that.
its very urgent
regards
PraDz
推荐答案
正则表达式是模式匹配实用程序。它可用于解析程序中消耗的数字,但它无法实现排序它们的最终目标。
Regular expressions are a pattern matching utility. It can be used to parse out the numbers to be consumed by your program, but it won't achieve your final goal of sorting them.
这篇关于使用正则表达式比较2个版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文