类似php里面的<?php
// Returns true if "abc" is found anywhere in $string.
ereg ("abc", $string); // Returns true if "abc" is found at the beginning of $string.
ereg ("^abc", $string);// Returns true if "abc" is found at the end of $string.
ereg ("abc$", $string);// Returns true if client browser is Netscape 2, 3 or MSIE 3.
eregi ("(ozilla.[23]|MSIE.3)", $HTTP_USER_AGENT); // Places three space separated words into $regs[1], $regs[2] and $regs[3].
ereg ("([[:alnum:]]+) ([[:alnum:]]+) ([[:alnum:]]+)", $string,$regs); // Put a <br /> tag at the beginning of $string.
$string = ereg_replace ("^", "<br />", $string);
// Put a <br /> tag at the end of $string.
$string = ereg_replace ("$", "<br />", $string); // Get rid of any newline characters in $string.
$string = ereg_replace ("\n", "", $string);
?>或者其他什么形式的都可以。
不知道我说明白没有。
解决方案 »
- 紧急:create一个Form后,该Form关闭,close事件caFree了,可是为什么assigned(myFormvar)还是为true呢?
- 为何用 SHGetFileInfo 获取的文件图标,保存为图标文件后失真(颜色数减少了)?
- 如何关闭“我的电脑”窗体
- 求连续纸套打样本程序
- 用virtual listview的时候,为何调整列宽的时候数据都乱了?
- 寻使用ADO组件向SQL server数据库追加记录的最好方法,具体情况如下:
- access视图中的nz函数在DELPHI中不认,isnull在access中又不认,怎么办呀??????
- Delphi封装的线程对象,如何同步线程,其中有我用CreateOLEObject创建的ADO对象和系统的全局变量???如何同步???
- 怎么实现在一个query中新增的是不相同的行呀(当行比较多时,要考算法)
- 如何在Delphi程序中让输入法保持一致。
- select title,sum(outquan) from xx group by title分类统计加序号的问题
- 我的DateControl组件页不见了
AnSo @ Web
http://anso.da.ru/
http://anso.virtualave.net/ TRegExpr library
http://anso.virtualave.net/regexpr.zip (~284 Kb) Help files: (42-55 Kb)Russian: http://anso.virtualave.net/RegExpRu.zip
English: http://anso.virtualave.net/RegExpE.zip
Bulgarian: http://anso.virtualave.net/regexpbg.zip
German: http://anso.virtualave.net/RegExpG.zip
French: http://anso.virtualave.net/RegExpF.zip
Spanish: http://anso.virtualave.net/RegExpS.zip
You can use regular expressions for example to search for a specified record in a database in a much more powerful way than using the SQL LIKE operator.Data validation
With Regular Expressions you can validate user input to check whether it follows a given format that due to its complexity and variability cannot be checked with masks. For example, you can check whether a string starts optionally with a plus or minus sign, then a sequence of no more than seven digits and optionally a point followed by up to two digits.Data extraction
Not only you can check whether a string follows a certain pattern, but you can extract arbitrary parts of the text. For example, for a phone number like '+1 (123) 555-9999' you can extract the country code ('1'), area code ('123') and the local number ('555-9999').
你马上也能了
http://regexpstudio.com/Downloads/regexpr.rar
我又下了一次了, 很正常!!