PB Script 支持正则表达式吗?

zzxing 2006-06-09 09:05:12
请问PB Script 支持正则表达式吗?PFC里面好象有,但我试验了一下行不通,请高人指点。谢谢!
...全文
390 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
一手软一手硬 2006-06-12
  • 打赏
  • 举报
回复
This statement returns true if the text in sle_ID begins with one or more uppercase or lowercase letters (^ at the beginning of the pattern means that the beginning of the string must match the characters that follow):

Match(sle_ID.Text, "^[A-Za-z]")

This statement returns false if the text in sle_ID contains any digits (^ inside a bracket is a complement operator):

Match(sle_ID.Text, "[^0-9]")

This statement returns true if the text in sle_ID contains one uppercase letter:

Match(sle_ID.Text, "[A-Z]")

This statement returns true if the text in sle_ID contains one or more uppercase letters (+ indicates one or more occurrences of the pattern):

Match(sle_ID.Text, "[A-Z]+")

This statement returns false if the text in sle_ID contains anything other than two digits followed by a letter (^ and $ indicate the beginning and end of the string):

Match(sle_ID.Text, "^[0-9][0-9][A-Za-z]$")
其实帮助里就有。有空的时候还是多看看吧。
hygougou 2006-06-11
  • 打赏
  • 举报
回复
match
http://blog.csdn.net/hygougou/archive/2006/01/03/569352.aspx
ruky9988 2006-06-11
  • 打赏
  • 举报
回复
match?
pb8 2006-06-11
  • 打赏
  • 举报
回复
用match函数
Match(ls_test, "^[0-9][0-9][A-Za-z]$")
^表示正则表达式为开始,$表示正则表达式的结束
ls_test的取值为前面两个字符为数字,第三个字母为大写或小写字母
ls_test符合要求返回true,否则为false
alwaystar 2006-06-10
  • 打赏
  • 举报
回复
match
bpy 2006-06-10
  • 打赏
  • 举报
回复
gz
billxia 2006-06-10
  • 打赏
  • 举报
回复
请详细说明,否则。。。。

1,077

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧