- 浏览: 174363 次
- 性别:
- 来自: 成都
文章分类
REPORT ZADN_SAMPLE. *----------------------------------------------------------------------* * -> CLASS cl_regex_test DEFINITION *----------------------------------------------------------------------* CLASS cl_regex_test DEFINITION FINAL. PUBLIC SECTION. METHODS : check_email IMPORTING p_email TYPE string. PRIVATE SECTION. DATA: o_regex TYPE REF TO cl_abap_regex, o_matcher TYPE REF TO cl_abap_matcher. ENDCLASS. "cl_regex_test DEFINITION *----------------------------------------------------------------------* * -> CLASS cl_regex_test IMPLEMENTATION *----------------------------------------------------------------------* CLASS cl_regex_test IMPLEMENTATION. METHOD check_email. * Create the regular expression: CREATE OBJECT o_regex EXPORTING pattern = '^[a-zA-Z]+(([\''\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*\s+<' & '(\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3})>$|^(\w[-._\w]*' & '\w@\w[-._\w]*\w\.\w{2,3})$'. * Check to see if the email matches the regular expression: CREATE OBJECT o_matcher EXPORTING regex = o_regex text = p_email. IF o_matcher->match( ) NE abap_true. MESSAGE 'Enter email address valid...' TYPE 'E'. ELSE. MESSAGE 'This is a valid email address...' TYPE 'S'. ENDIF. ENDMETHOD. "check_email ENDCLASS. "cl_regex_test IMPLEMENTATION ************************************************************************ ************************************************************************ * * * PROGRAM FLOW LOGIC * * * ************************************************************************ START-OF-SELECTION. DATA : ocl_regex_test TYPE REF TO cl_regex_test. CREATE OBJECT ocl_regex_test. ocl_regex_test->check_email( 'abapdn.network@mail.com' ).
发表评论
-
DISABLE button(FCODE) from the GUI-Status
2014-08-04 15:54 6321. Goto-> Attributes->Pus ... -
Handy SAP function module to automate user events
2013-11-28 09:49 751*Begin-Auto triggers ENTER comm ... -
set Billing block to blank for Sals Order
2013-04-17 15:16 819FM: SD_WF_ORDER_DEL_BILLING_BLO ... -
set Billing block to blank for Sals Order
2013-04-17 15:16 744FM: SD_WF_ORDER_DEL_BILLING_BLO ... -
Unpermitted combination of business object BUS2032 and sales doc. category H
2013-01-25 14:20 4135Q: create New Sales Order using ... -
Function Module: get all users who have specific role
2013-01-25 14:16 679CALL FUNCTION 'RSRA_USERS_O ... -
Create a SELECT-OPTIONS in a module pool screen
2012-03-07 15:35 1027source:http://abap-explorer.blo ... -
Converting OTF data from script to Spool Request
2012-03-06 17:25 0source:http://forums.sdn.sap.co ... -
Calculate the days, months and years between 2 dates.
2012-02-21 16:14 835FORM compute_2date_diff. DAT ... -
Retrieving Domain fixed values
2012-02-16 11:13 812source:http://www.saptechnical. ... -
If 1 equals 2, what’s the purpose?
2012-02-16 10:59 837source:http://sapport.blogspot. ... -
get status name for batch input session
2012-01-31 14:47 923Line 601 in program SAPMSBDC_CC ... -
create zip folder with cl_abap_zip
2011-12-05 18:11 1210REPORT ztest. DATA: gv_file ... -
MIRO
2011-11-29 10:39 2066from: http://help-sap.blogspot. ... -
Create Vendor or Customer_master Data
2011-11-23 16:22 2920To Create or Change Vendor_mast ... -
Pay attention to the following points when using append structures
2011-10-27 13:43 1311You cannot create append str ... -
Help Views
2011-10-20 10:46 739source:http://help.sap.com/saph ... -
What is the Different Types and Usage of Views
2011-10-19 23:06 849source:http://www.sap-img.com/a ... -
Upload a Comma Delimited CSV file that contains commas in data
2011-09-23 17:22 2234source:http://wiki.sdn.sap.com/ ... -
What is the difference between SET SCREEN and CALL SCREEN ?
2011-09-19 21:50 763source:http://www.saptechies.co ...
相关推荐
本文将详细探讨如何利用正则表达式来提取`<tr>`和`<td>`标签内的数据。 **正则表达式基础** 正则表达式是一种模式匹配工具,用于在文本中查找、替换或提取特定的字符串模式。在HTML中,`<tr>`标签定义了一行,`<td>...
practice solutions for performing type conversions and lexical ...Regex<br><br>Function objects defined at the call site with Boost.Bind and Boost.Lambda<br><br>More flexible callbacks with Boost....
<br><br>public class UserDaoImpl implements UserDao {<br><br> public User queryForSignOn(String username) {<br> User user = queryUser(username);<br> if(user.getLocked())<br> throw new LockException...
practice solutions for performing type conversions and lexical ...Regex<br><br>Function objects defined at the call site with Boost.Bind and Boost.Lambda<br><br>More flexible callbacks with Boost....
<br>java.util.regex [26 examples] <br>java.util.zip [9 examples] <br>javax.accessibility [7 examples] <br>javax.crypto [14 examples] <br>javax.imageio [6 examples] <br>javax.naming [9 examples] <br>...
This is a patch file to fix the bugs of EditPlus v2.31<br><br>Copyright © 1998-2007 ES-Computing<br>Contact: support@editplus.com<br>Homepage: http://www.editplus.com/<br><br>INSTALLATION<br>========...
32<br>2.1 引言 32<br>2.2 使用Regex类来分解字符串 32<br>2.3 用Match和MatchCollection类来搜索字符串 39<br>2.4 处理捕获组和捕获 45<br>2.5 解析和置换字符串 53<br>2.6 使用捕获组和替换模式置换匹配 56<br>2.7...
<value>protocol-httpclient|urlfilter-regex|index-(basic|more)|query-(basic|site|url|lang)|indexer-solr|nutch-extensionpoints|protocol-httpclient|urlfilter-regex|parse-(text|html|msexcel|msword|...
书名:Mastering Regular Expressions, 3rd Edition<br>格式:CHM<br>语言:English<br>简介... If you think you know all you need to know about regular<br>expressions, this book is a stunning eye-opener.<br>
<tr><td>数据1</td><td>数据2</td></tr> <tr><td>数据3</td><td>数据4</td></tr> </table> "; // 正则表达式匹配<td>中的内容 string pattern = @"<td>(.*?)<\/td>"; Regex regex = new Regex(pattern, ...
--regex <arg> filter query by regex, syntax is field:/regex/ --show-hits show total hit count --show-id show Lucene document id in results --show-score show score in results --sort-fields sort ...
<br>res\xml\network_and_internet.xml res\drawable\ic_ethernet_cell.xml <br>res\values\strings.xml res\xml\ethernet_settings.xml <br>res\xml\ethernet_static_ip.xml <br>src\...
- `<regex>`:正则表达式支持。 - `<thread>`:多线程支持。 - `<atomic>`:原子操作,用于线程安全。 - `<mutex>` 和 `<condition_variable>`:互斥锁和条件变量。 - `<shared_ptr>`,`<unique_ptr>` 和 `...
- `<regex>`:提供了正则表达式支持。 - `<thread>`:多线程支持,包括`std::thread`类。 - `<mutex>`和`<atomic>`:线程同步和原子操作。 - `<chrono>`:时间点和持续时间的处理,替代了`<ctime>`。 6. **...
* <regex.h>:正则表达式 * <tar.h>:tar归档值 * <termios.h>:终端I/O * <unistd.h>:符号常量 * <utime.h>:文件时间 * <wordexp.h>:字扩展类型 POSIX标准定义的XSI扩展头文件 POSIX标准定义了26个XSI扩展...
1- Save attached db2_regex.zip file to a... \>db2 connect to <my_db> user <uid> using <pwd> \>db2 set current schema='REGEXP' \>db2 -td@ -vf C:\avalanche\db2_regex\scripts\sql\db2_regex_functions.sql
regEx.Pattern = "<(\/){0,1}object[^<>]*>" regEx.IgnoreCase = True regEx.Global = True ClsTempLoseStr = regEx.Replace(ClsTempLoseStr,"") LoseObjectTag = ClsTempLoseStr Set regEx = Nothing End Function ...
reg <flags> <regex> <replacement> 这直接映射到 Javascript 的String.replace函数: var regex = new RegExp ( < regex> , < flags> ); str.replace(regex, < replacement> ); 例子 cat /etc/passwd | reg :. *...
正则表达式