CodeTyphon32中自带例子源码:用内置的正则函数LSExtractStringU
发布时间:2020-12-14 00:56:27 所属栏目:百科 来源:网络整理
导读:========================== C:codetyphonCodeOceanSolutionssamplesLSRegEx 目前可以验证的格式: CLSHTTPSendAttempts: Byte = 3; CLSConstsNullDate: TDateTime = 0; CLSConstsNullTime: TDateTime = 0; CLSConstsTimeFormat: ShortString = 'hh:mm:
========================== C:codetyphonCodeOceanSolutionssamplesLSRegEx
目前可以验证的格式: CLSHTTPSendAttempts: Byte = 3; CLSConstsNullDate: TDateTime = 0; CLSConstsNullTime: TDateTime = 0; CLSConstsTimeFormat: ShortString = 'hh:mm:ss'; CLSConstsDateFormat: ShortString = 'yyyy/mm/dd'; CLSConstsExtractIPRegEx: string = '^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]).(25[0-5]' + '|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0).(25[0-5]|2[0-4]' + '[0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0).(25[0-5]|2[0-4][0-9]|[' + '0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$'; CLSConstsExtractEmailRegEx: string = '([wd-.]+@[wd-]+(.[wd-]+)+)'; CLSConstsExtractEmailRegEx2: string = '[^wd-.]([wd-.]+@[wd-]+(.[wd-]+)+)[^wd-.]'; CLSConstsExtractURLRegEx: string = '((http)|(https)|(ftp))://([- w]+.)+w{2,3}(/ [%-w]+(.w{2,})?)*'; { Matches (12) 123 1234 | (01512) 123 1234 | (0xx12) 1234 1234 Non-Matches 12 123 1234 | (012) 123/1234 | (012) 123 12345 See: http://regexlib.com/REDetails.aspx?regexp_id=34 } CLSConstsExtractTelRegEx: string = '(([0-9]{2}|0{1}((x|[0-9]){2}[0-9]{2})))s*[0-9]{3,4}[- ]*[0-9]{4}'; { Matches 18008793262 | 800-879-3262 | 0-800.879.3262 Non-Matches 879 3262 | 077 879 3262 | 879-3262 } CLSConstsExtractTelRegEx2: string = '^[01]?[- .]?(?[2-9]d{2})?[- .]?d{3}[- .]?d{4}$'; CLSSendMailPath: string = {$IFDEF UNIX} '/usr/bin/lssendmail' {$ELSE} '%sLazSolutionsLSSendMaillssendmail.exe' {$ENDIF}; CLSTimeEditDisplayFrmtHM: string = 't'; CLSTimeEditDisplayFrmtHMS: string = 'tt'; CLSTimeEditMaskHM: string = '!#9%s99;1;_'; CLSTimeEditMaskHMS: string = '!#9%s99%s99;1;_'; CLSGeoIPCountryDATFileName: TFileName = 'GeoIP.dat'; CLSGeoIPCityDATFileName: TFileName = 'GeoLiteCity.dat'; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |