LISP怎么去除一个字符串中的罗马数字
LISP怎么去除一个字符串中的罗马数字,比如字符串“A4B5CD”,去除罗马数字4和5,变为"ABCD"。...
LISP怎么去除一个字符串中的罗马数字,比如字符串“A4B5CD”,去除罗马数字4和5,变为"ABCD"。
展开
1个回答
展开全部
用find的替换功能
查找对象请输入[0-9]
替换成空即可
lisp的话,用vl-string-subst函数,下面是函数说明:
vl-string-subst
Substitutes one string for another, within a
string
(vl-string-subst new-str pattern string [start-pos])
Arguments
new-str
The string to be substituted for pattern.
pattern
A string containing the pattern to be replaced.
string
The string to be searched for pattern.
start-pos
An integer identifying the starting position of the search;
0 if omitted.
Note that the search is case-sensitive, and that vl-string-subst substitutes only the first
occurrence it finds of the string.
Return Values
The value of string after any
substitutions have been made.
查找对象请输入[0-9]
替换成空即可
lisp的话,用vl-string-subst函数,下面是函数说明:
vl-string-subst
Substitutes one string for another, within a
string
(vl-string-subst new-str pattern string [start-pos])
Arguments
new-str
The string to be substituted for pattern.
pattern
A string containing the pattern to be replaced.
string
The string to be searched for pattern.
start-pos
An integer identifying the starting position of the search;
0 if omitted.
Note that the search is case-sensitive, and that vl-string-subst substitutes only the first
occurrence it finds of the string.
Return Values
The value of string after any
substitutions have been made.
追问
不太清楚
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询