字符串连接中的通配符 [英] Wildcard in a String Concatenating

查看:116
本文介绍了字符串连接中的通配符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在评估函数中的字符串(下面)。

展开 | 选择 | Wrap | 行号

解决方案

您可以使用正则表达式来验证字符串....


如果你可以指出你究竟需要它来检查我或论坛上的其他人可以帮助你写正则表达式验证字符串


[/ w / d]这将验证正则表达式中的单词字符和小数,其中包括az _和0-9


^ [a-zA-Z / d] + [_] + [\ w] +

这将验证

cat_hat但是会在_hat或任何不包含_的内容上失败,而且除了指定的其他字符之外的任何内容都会失败..

展开 | 选择 | Wrap | 行号


好的,所以这看起来更像是在asp中使用的不同类(sql语句而不是简单字符串)。网更多,而不是直接vb.net?我不得不消化这个因为我不熟悉。但是你说字符串操作不允许我问的是什么?感谢。

I''m evaluating a string (below) in a function.

Expand|Select|Wrap|Line Numbers

解决方案

you can use a regular expression to validate strings....

If you can spec out what exactly you need it to check for I or someone else on the forum can help you write the regular expression to validate the string


[/w/d] this would validate word characters and decimals in regular expression which includes a-z _ and 0-9

^[a-zA-Z/d]+[_]+[\w]+


this would validate
cat_hat but would fail on _hat or anything not containing _ and anything with other characters than whats specified would fail..

Expand|Select|Wrap|Line Numbers


Ok, so this looks more like a different class (sql statements rather than simple strings) that''s used in asp.net more so, rather than straight vb.net? I''ll have to digest this because I''m unfamiliar. But you''re saying string manipulation doesn''t allow what I''m asking? Thanks.


这篇关于字符串连接中的通配符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆