[英]How can I trim a string if input is Ramesh-123-india ...my desire output should be only "india""
In material table one of the column has to be trim..for example input is ramesh-123-india,the output should be come as only "india"....how to do this在材料表中,其中一列必须修剪..例如输入是 ramesh-123-india,output 应该只作为“印度”来......如何做到这一点
Consider looking into the split()
.考虑查看
split()
。 JavaScript docs JavaScript 文档
You can pass in a string pattern that it searches for to split it up.您可以传入它搜索的字符串模式以将其拆分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.