Regular Expressions 101

Save & Share

Flavor

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8
  • .NET 7.0 (C#)
  • Rust
  • Regex Flavor Guide

Function

  • Match
  • Substitution
  • List
  • Unit Tests

Tools

Sponsors
There are currently no sponsors. Become a sponsor today!
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.
  • All Tokens
  • Common Tokens
  • General Tokens
  • Anchors
  • Meta Sequences
  • Quantifiers
  • Group Constructs
  • Character Classes
  • Flags/Modifiers
  • Substitution
  • A single character of: a, b or c
    [abc]
  • A character except: a, b or c
    [^abc]
  • A character in the range: a-z
    [a-z]
  • A character not in the range: a-z
    [^a-z]
  • A character in the range: a-z or A-Z
    [a-zA-Z]
  • Any single character
    .
  • Alternate - match either a or b
    a|b
  • Any whitespace character
    \s
  • Any non-whitespace character
    \S
  • Any digit
    \d
  • Any non-digit
    \D
  • Any word character
    \w
  • Any non-word character
    \W
  • Match everything enclosed
    (?:...)
  • Capture everything enclosed
    (...)
  • Zero or one of a
    a?
  • Zero or more of a
    a*
  • One or more of a
    a+
  • Exactly 3 of a
    a{3}
  • 3 or more of a
    a{3,}
  • Between 3 and 6 of a
    a{3,6}
  • Start of string
    ^
  • End of string
    $
  • A word boundary
    \b
  • Non-word boundary
    \B

Regular Expression

/
/
ig

Test String

Code Generator

Generated Code

$re = '/(?m:((?<=").*?$)|((?i:\*)([\t ].*?)?$))/i'; $str = 'CLASS zcl_re7_upd_ctrl DEFINITION PUBLIC CREATE PUBLIC . PUBLIC SECTION. CONSTANTS gc_deleted_m_type TYPE rebdmeas VALUE \'W001\'. "#EC NOTEXT CONSTANTS gc_deleted_m_value TYPE rebdmeasvalue VALUE 0. "#EC NOTEXT METHODS fill_log_from_bapiret2 IMPORTING !bapi_return TYPE bapiret2_t . METHODS constructor IMPORTING !obj_type TYPE string !mode TYPE string !window_start_date TYPE datum !window_end_date TYPE datum !last_update_ts TYPE tzntstmpl "Timestamp of last update . METHODS main . CLASS-METHODS gen_next_window_start_date IMPORTING !obj_type TYPE string !last_update_ts TYPE tzntstmpl "Timestamp of last update RETURNING VALUE(next_window_start_date) TYPE datum . CLASS-METHODS gen_init_window_start_date IMPORTING !window_end_date TYPE datum RETURNING VALUE(window_start_date) TYPE datum . PROTECTED SECTION. PRIVATE SECTION. CONSTANTS gc_login_app TYPE string VALUE \'fpp_ena\' ##NO_TEXT. CONSTANTS gc_login_lang TYPE string VALUE \'pl\' ##NO_TEXT. CONSTANTS gc_login_user TYPE string VALUE \'sap\' ##NO_TEXT. CONSTANTS gc_login_password TYPE string VALUE \'IVNhcFNlcnZpY2U1Kg==\' ##NO_TEXT. CLASS-METHODS init_log RETURNING VALUE(go_log) TYPE REF TO if_reca_message_list. DATA go_log TYPE REF TO if_reca_message_list . DATA buffer TYPE zre_t_measur_buf_tab . DATA last_update_ts TYPE tzntstmpl . DATA obj_type TYPE string . DATA m_type TYPE rebdmeas . " TODO: move to subclass DATA proxy TYPE REF TO zre7_co_si_get_ln_lngths_so . DATA mode TYPE string . DATA window_start_date TYPE datum . DATA window_end_date TYPE datum . DATA received_ts TYPE tzntstmpl. DATA tz TYPE timezone. DATA status_rec TYPE zre_t_measur_sta. DATA: is_line TYPE boolean, is_building TYPE boolean, is_property TYPE boolean . DATA current_ts TYPE tzntstmpl. * DATA go_events TYPE REF TO lcl_handle_events. METHODS process_building IMPORTING !building_obj TYPE REF TO if_rebd_building !value TYPE rebdmeasvalue !unit TYPE rebdmeasunit RAISING zcx_re1_exception . METHODS calc_valid_period_for_building EXPORTING !valid_from TYPE recadatefrom !valid_to TYPE recadateto . METHODS commit_changes . METHODS process . METHODS read_buffer . METHODS download_data_to_buffer IMPORTING update_timestamp TYPE any OPTIONAL RAISING zcx_re1_exception . METHODS create_proxy . METHODS clean_buffer IMPORTING processed TYPE zre_t_measur_buf_tab. METHODS finish. METHODS store_data_in_buffer IMPORTING received_data TYPE zre7_get_ln_lngths_resp_lc_tab update_timestamp TYPE tzntstmpl window_start_date TYPE datum window_end_date TYPE datum . METHODS init_status_record. METHODS setup_new_window_dates. METHODS display_buffor IMPORTING buffer TYPE zre_t_measur_buf_tab. ENDCLASS. CLASS zcl_re7_upd_ctrl IMPLEMENTATION. METHOD calc_valid_period_for_building. DATA next_year TYPE char4. DATA next_year_i TYPE integer. next_year = me->window_end_date(4). next_year_i = next_year. next_year_i = next_year_i + 1. next_year = next_year_i. valid_from = next_year && \'0101\'. valid_to = valid_from. ENDMETHOD. METHOD clean_buffer. zcl_re7_storage_gateway=>clean_buffer( processed ). ENDMETHOD. METHOD commit_changes. DATA: ls_return TYPE bapiret2. * * W zależności od trybu wykonania zrób commit albo rolback i wyświetl raport * IF p_exetyp = \'S\'. * * * Do nothing - rollback not needed, BAPI_RE_BU_CHANGE run in simulation mode * * ELSEIF p_exetyp = \'E\'. CALL FUNCTION \'BAPI_TRANSACTION_COMMIT\' EXPORTING wait = abap_true IMPORTING return = ls_return. IF ls_return-type CA \'EAX\'. CALL METHOD me->go_log->add_from_bapi EXPORTING is_bapiret = ls_return. ENDIF. ENDMETHOD. METHOD constructor. DATA l_ts TYPE tzntstmpl. DATA: l_window_start_date TYPE datum, lcx TYPE REF TO zcx_re1_exception. IF mode = \'download\' OR mode = \'view\' OR mode = \'buffer\'. ELSE. MESSAGE \'API error: Incorrect usage of class zcl_re7_upd_ctrl - mode must be one of: download, view, buffer.\' TYPE \'E\'. ENDIF. * CREATE OBJECT update_controller. me->mode = mode. IF obj_type = \'line\' OR obj_type = \'building\' OR obj_type = \'property\'. ELSE. MESSAGE \'API error: Incorrect usage of class zcl_re7_upd_ctrl - obj_type must be one of: line, building or property.\' TYPE \'E\'. ENDIF. me->obj_type = obj_type. CALL FUNCTION \'GET_SYSTEM_TIMEZONE\' IMPORTING timezone = me->tz EXCEPTIONS customizing_missing =1. me->go_log = zcl_re7_upd_ctrl=>init_log( ). me->last_update_ts = last_update_ts. CONVERT DATE sy-datum TIME sy-uzeit INTO TIME STAMP me->current_ts TIME ZONE me->tz. IF mode <> \'download\'. IF last_update_ts IS INITIAL. MESSAGE \'API error: Incorrect usage of class zcl_re7_upd_ctrl - if processing buffer, ts must not be empty.\' TYPE \'E\'. ENDIF. ELSE. ENDIF. me->window_start_date = window_start_date. me->window_end_date = window_end_date. ENDMETHOD. METHOD create_proxy. ENDMETHOD. METHOD display_buffor. DATA: ls_key TYPE salv_s_layout_key, lo_salv_msg TYPE REF TO cx_salv_msg, lo_table TYPE REF TO cl_salv_table, lo_cols TYPE REF TO cl_salv_columns_table, lo_events TYPE REF TO cl_salv_events_table, lo_funcs TYPE REF TO cl_salv_functions_list, lo_layout TYPE REF TO cl_salv_layout, lo_display TYPE REF TO cl_salv_display_settings, lt_buffer LIKE buffer. lt_buffer = buffer. TRY. CALL METHOD cl_salv_table=>factory( IMPORTING r_salv_table = lo_table CHANGING t_table = lt_buffer ). CATCH cx_salv_msg INTO lo_salv_msg. CLEAR lo_table. CALL METHOD cl_reca_message_services=>raise_from_exception EXPORTING io_exception = lo_salv_msg EXCEPTIONS error = 1 OTHERS = 2. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE \'S\' NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4 DISPLAY LIKE sy-msgty. ENDIF. RETURN. ENDTRY . ** Include own functions by setting own status * lo_table->set_screen_status( * pfstatus = \'STATUS_1\' * report = sy-repid * set_functions = lo_table->c_functions_all ). ** Events * lo_events = lo_table->get_event( ). * CREATE OBJECT go_events. ** Register to the event USER_COMMAND * SET HANDLER go_events->on_user_command FOR lo_events. ** Register to the event DOUBLE_CLICK * SET HANDLER go_events->on_double_click FOR lo_events. * * Layouts ls_key-report = sy-repid. lo_layout = lo_table->get_layout( ). lo_layout->set_key( ls_key ). lo_layout->set_default( abap_true ). lo_layout->set_save_restriction( ). lo_cols = lo_table->get_columns( ). lo_cols->set_optimize( abap_true ). * Functions lo_funcs = lo_table->get_functions( ). lo_funcs->set_all( abap_true ). * Display Settings lo_display = lo_table->get_display_settings( ). lo_display->set_striped_pattern( abap_true ). * Display ALV lo_table->display( ). ENDMETHOD. METHOD download_data_to_buffer. DATA: exception_ref TYPE REF TO cx_ai_system_fault, exception_ref_a TYPE REF TO cx_ai_application_fault, lcx TYPE REF TO zcx_re1_exception, l_exception_msg TYPE string, wa_output TYPE zre7_get_ln_lngths_rq_lcl, wa_input TYPE zre7_get_ln_lngths_resp_lcl, lv_message TYPE string, exception_ref_root TYPE REF TO cx_root, tz TYPE timezone. MESSAGE s006(zre7) WITH me->window_start_date me->window_end_date INTO lv_message. me->go_log->add_symsg( ). wa_output-get_line_lengths_request_local-date_from = me->window_start_date. wa_output-get_line_lengths_request_local-date_to = me->window_end_date. wa_output-get_line_lengths_request_local-login-app = gc_login_app. wa_output-get_line_lengths_request_local-login-lang = gc_login_lang. wa_output-get_line_lengths_request_local-login-user = gc_login_user. wa_output-get_line_lengths_request_local-login-password = gc_login_password. TRY . CREATE OBJECT me->proxy. me->proxy->si_get_line_lengths_sync_out( EXPORTING output = wa_output IMPORTING input = wa_input ). IF wa_input-get_ln_lngths_resp_lcl-status-status_code = \'OK\'. DATA(received_count) = lines( wa_input-get_ln_lngths_resp_lcl-row ) . MESSAGE s010(zre7) WITH received_count INTO lv_message. me->go_log->add_symsg( ). * received_ts = wa_input-get_ln_lngths_resp_lcl-status-time_stamp. received_ts = me->current_ts. zcl_re7_storage_gateway=>save_sta_record( me->status_rec ). me->store_data_in_buffer( received_data = wa_input-get_ln_lngths_resp_lcl-row update_timestamp = received_ts window_start_date = me->window_start_date window_end_date = me->window_end_date ). COMMIT WORK. MESSAGE s011(zre7) INTO lv_message. me->go_log->add_symsg( ). COMMIT WORK. * me->last_update_ts = received_ts. ELSE. lcx = zcx_re1_exception=>create( ). MESSAGE e007(zre7) INTO lv_message. me->go_log->add_symsg( ). MESSAGE e008(zre7) WITH wa_input-get_ln_lngths_resp_lcl-status-error_reason wa_input-get_ln_lngths_resp_lcl-status-debug_msg INTO lv_message. me->go_log->add_symsg( ). lcx->add_sy( ). RAISE EXCEPTION lcx. ENDIF. * TODO: extract message logging into sep meth. and fix shortened longtext CATCH cx_ai_system_fault INTO exception_ref. l_exception_msg = exception_ref->get_text( ). WRITE: \'AI SYSTEM:\', l_exception_msg. lcx = zcx_re1_exception=>create( ). MESSAGE e007(zre7) INTO lv_message. me->go_log->add_symsg( ). MESSAGE e008(zre7) WITH \'cx_ai_system_fault\' l_exception_msg INTO lv_message. me->go_log->add_symsg( ). lcx->add_sy( ). RAISE EXCEPTION lcx. CATCH cx_ai_application_fault INTO exception_ref_a. l_exception_msg = exception_ref->get_longtext( ). WRITE: \'AI APP:\', l_exception_msg. MESSAGE e007(zre7) INTO lv_message. me->go_log->add_symsg( ). MESSAGE e008(zre7) WITH \'cx_ai_application_fault\' l_exception_msg INTO lv_message. me->go_log->add_symsg( ). lcx->add_sy( ). RAISE EXCEPTION lcx. CATCH cx_root INTO exception_ref_root. l_exception_msg = exception_ref_root->get_longtext( ). WRITE: \'AI APP:\', l_exception_msg. MESSAGE e007(zre7) INTO lv_message. me->go_log->add_symsg( ). MESSAGE e008(zre7) WITH \'cx_ai_application_fault\' l_exception_msg INTO lv_message. me->go_log->add_symsg( ). lcx->add_sy( ). RAISE EXCEPTION lcx. ENDTRY. ENDMETHOD. METHOD fill_log_from_bapiret2. CALL METHOD me->go_log->add_from_bapi EXPORTING it_bapiret = bapi_return. ENDMETHOD. METHOD finish. CALL FUNCTION \'RECA_GUI_MSGLIST_POPUP\' EXPORTING io_msglist = me->go_log if_popup = abap_false. me->go_log->store( * EXPORTING * if_in_update_task = ABAP_TRUE " Call update program using "IN UPDATE TASK" EXCEPTIONS error = 1 OTHERS = 2 ). IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. COMMIT WORK. ENDMETHOD. METHOD gen_init_window_start_date. window_start_date = window_end_date. window_start_date+4 = \'0101\'. ENDMETHOD. METHOD gen_next_window_start_date. * DATA lv_last_update_ts TYPE tzntstmpl. ** me->last_update_ts should already contain TS of the last update, but to be sure.. * lv_last_update_ts = zcl_re7_storage_gateway=>get_last_meas_upd_ts( m_type = m_type ). IF NOT last_update_ts IS INITIAL. zcl_re7_storage_gateway=>get_window_dates_from_stas_tab( EXPORTING obj_type = obj_type last_update_ts = last_update_ts IMPORTING window_end_date = DATA(last_window_end_date) ). IF NOT last_window_end_date IS INITIAL. next_window_start_date = last_window_end_date + 1. ENDIF. IF next_window_start_date > sy-datum. next_window_start_date = sy-datum. ENDIF. ENDIF. ENDMETHOD. METHOD init_log. CALL METHOD cf_reca_message_list=>create EXPORTING id_object = \'ZRE7_IF\' id_subobject = \'ZRE7_LN_MEAS_UPD\' id_extnumber = \'RE Line Measures Update Log\' RECEIVING ro_instance = go_log. ENDMETHOD. METHOD init_status_record. me->status_rec-timestamp = me->current_ts. me->status_rec-created_by_user = sy-uname. me->status_rec-is_line = me->is_line. me->status_rec-is_building = me->is_building. me->status_rec-is_property = me->is_property. * me->status_rec-processing_finished = abap_false. me->status_rec-window_start_date = me->window_start_date. me->status_rec-window_end_date = me->window_end_date. ENDMETHOD. METHOD main. DATA: lv_last_update_ts TYPE tzntstmpl, lv_message TYPE string. * me->display_buffor( me->buffer ). IF me->mode = \'download\'. TRY. me->setup_new_window_dates( ). IF me->window_start_date > me->window_end_date. MESSAGE e013(zre7) INTO lv_message. me->go_log->add_symsg( ). me->finish( ). RETURN. ENDIF. me->init_status_record( ). me->download_data_to_buffer( ). CATCH zcx_re1_exception INTO DATA(lcx_download). me->finish( ). RETURN. ENDTRY. ELSEIF me->mode = \'buffer\' OR me->mode = \'view\'. me->status_rec = zcl_re7_storage_gateway=>read_sta_record( last_update_ts = me->last_update_ts obj_type = me->obj_type ). me->window_start_date = me->status_rec-window_start_date. me->window_end_date = me->status_rec-window_end_date. me->read_buffer( ). ENDIF. * >>> mark processing start in STA table - update entry with matching ts IF me->mode = \'buffer\' OR me->mode = \'download\'. me->process( ). * commit changes * display log me->finish( ). ELSEIF me->mode = \'view\'. me->display_buffor( buffer = me->buffer ). ENDIF. ENDMETHOD. METHOD process. DATA: lv_validfrom TYPE recadatefrom, lv_validto TYPE recadateto, lt_buildings TYPE re_t_if_rebd_building , lcx TYPE REF TO zcx_re1_exception, lt_processed LIKE me->buffer, lv_message TYPE string. * get all distinct municip_ids * loop at municip_ids * read all buff records with municip_id * loop at municip_id/sat_id * process building (update meas) * endloop * endloop MESSAGE s014(zre7) WITH me->window_start_date me->window_end_date INTO lv_message. me->go_log->add_symsg( ). DATA(lt_munic_ids) = me->buffer. SORT lt_munic_ids BY municip_id ASCENDING. DELETE ADJACENT DUPLICATES FROM lt_munic_ids COMPARING municip_id. me->calc_valid_period_for_building( IMPORTING valid_from = lv_validfrom valid_to = lv_validto ). LOOP AT lt_munic_ids ASSIGNING FIELD-SYMBOL(<fs_buffer_record>) . CLEAR lt_buildings. lt_buildings = zcl_re7_storage_gateway=>get_buildings_by_municip_key( municip_key = <fs_buffer_record>-municip_id go_log = me->go_log ). LOOP AT lt_buildings ASSIGNING FIELD-SYMBOL(<fs_building_obj>). IF zcl_re7_storage_gateway=>check_building_validity( building = <fs_building_obj> valid_from = lv_validfrom valid_to = lv_validto ) = abap_true. TRY. IF zcl_re7_storage_gateway=>is_building_assigned_to_sat( building_obj = <fs_building_obj> valid_from = lv_validfrom valid_to = lv_validto sat = <fs_buffer_record>-sat ) = abap_true. TRY. * TODO: refactor! pass whole record? me->process_building( building_obj = <fs_building_obj> value = <fs_buffer_record>-value_length unit = <fs_buffer_record>-unit_length ). APPEND <fs_buffer_record> TO lt_processed. CATCH zcx_re1_exception INTO lcx. me->fill_log_from_bapiret2( lcx->get_list( ) ). ENDTRY. ENDIF. CATCH zcx_re1_exception INTO lcx. me->go_log->add_from_exception( EXPORTING io_exception = lcx " Global Exception Reference * if_cumulate = " Cumulation of Messages * id_detlevel = " Level of Detail (0..9) * id_probclass = " Problem class * id_tabname = " Table Name * id_fieldname = " Field Name * id_value = " Value * id_index = " Line Index * id_intreno = " INTRENO of Calling Program * id_context = " Enhanced Navigation Data (Maximum 75 Characters) ). ENDTRY. ELSE. MESSAGE w003(zre7) WITH <fs_buffer_record>-sat <fs_buffer_record>-municip_id lv_validfrom lv_validto INTO lv_message. me->go_log->add_symsg( ). ENDIF. ENDLOOP. IF sy-subrc = 4 . MESSAGE w005(zre7) WITH <fs_buffer_record>-municip_id INTO lv_message. me->go_log->add_symsg( ). ENDIF. ENDLOOP. IF sy-subrc = 4 . MESSAGE s004(zre7) INTO lv_message. me->go_log->add_symsg( ). ENDIF. IF lt_processed IS NOT INITIAL. " TODO: remember to enable after tests! me->clean_buffer( lt_processed ). ENDIF. IF lines( lt_processed ) <> lines( me->buffer ). MESSAGE w002(zre7) INTO lv_message. me->go_log->add_symsg( ). ENDIF. * >>> update status in STA table me->commit_changes( ). ENDMETHOD. METHOD process_building. DATA: lt_return TYPE TABLE OF bapiret2, lt_measurement TYPE TABLE OF bapi_re_measurement_datc, ls_meas_change LIKE LINE OF lt_measurement. DATA: lv_test_run TYPE abap_bool VALUE abap_false. DATA: bukrs TYPE bukrs, swenr TYPE swenr, sgenr TYPE sgenr , lv_message TYPE string. FIELD-SYMBOLS <ls_meas> TYPE LINE OF re_t_rebd_meas. * check if line not deleted (look for measurement W0001 with value 0) * check if measurement exists (for validity period) * -> close measurement by setting valid_to = 31.12.YYYY (YYYY from me->window_end_date) * -> if valid_from > new_valid_to * -> report error * * insert new measurement: value = value, valid_from = 01.01.YYYY+1 (YYYY from me->window_end_date) me->calc_valid_period_for_building( IMPORTING valid_from = DATA(lv_validfrom) ). DATA(building_details) = building_obj->get_detail( ). bukrs = building_details-bukrs. swenr = building_details-swenr. sgenr = building_details-sgenr. * data(building_desc_key) = bukrs && \'/\' && swenr && \'/\' && sgenr. DATA(lo_meas_mngr) = building_obj->get_meas_mngr( ). " get measurements for buildng CALL METHOD lo_meas_mngr->get_list EXPORTING if_fix_periods = abap_true IMPORTING et_list = DATA(lt_meas). * -------------------- * processing.. * -------------------- " check if deleted LOOP AT lt_meas ASSIGNING <ls_meas> WHERE meas = zcl_re7_upd_ctrl=>gc_deleted_m_type AND measvalue = zcl_re7_upd_ctrl=>gc_deleted_m_value. IF <ls_meas>-validfrom <= lv_validfrom AND <ls_meas>-validto >= lv_validfrom. MESSAGE w012(zre7) WITH bukrs && \'/\' && swenr && \'/\' && sgenr INTO lv_message. me->go_log->add_symsg( ). RETURN. " building deleted, not to be processed ENDIF. ENDLOOP. " look for existing, open or overlapping measurements, that need to be closed first LOOP AT lt_meas ASSIGNING <ls_meas> WHERE validto >= lv_validfrom AND meas = me->m_type. IF <ls_meas>-validfrom < lv_validfrom. CLEAR ls_meas_change. ls_meas_change-change_indicator = \'U\'. ls_meas_change-measurement = <ls_meas>-meas. ls_meas_change-valid_from = <ls_meas>-validfrom. ls_meas_change-valid_to = lv_validfrom - 1. ls_meas_change-value_avail = <ls_meas>-measvalue. APPEND ls_meas_change TO lt_measurement. ENDIF. ENDLOOP. * insert new value CLEAR ls_meas_change. ls_meas_change-change_indicator = \'I\'. ls_meas_change-measurement = me->m_type. ls_meas_change-valid_from = lv_validfrom. ls_meas_change-valid_to = zcl_re7_storage_gateway=>gc_max_date. ls_meas_change-value_avail = value. APPEND ls_meas_change TO lt_measurement. * Update measurements for building CALL FUNCTION \'BAPI_RE_BU_CHANGE\' EXPORTING compcode = bukrs businessentitynumber = swenr buildingnumber = sgenr test_run = lv_test_run TABLES measurement = lt_measurement return = lt_return. IF lt_return IS NOT INITIAL. LOOP AT lt_return TRANSPORTING NO FIELDS WHERE type CA \'EAX\'. * raise exception with bapiret DATA(lo_exception) = zcx_re1_exception=>create( ). lo_exception->add_bapiret( EXPORTING it_message = lt_return ). RAISE EXCEPTION lo_exception. ENDLOOP. * log success me->fill_log_from_bapiret2( lt_return ). ENDIF. ENDMETHOD. METHOD read_buffer. zcl_re7_storage_gateway=>read_buffer( EXPORTING m_type = me->m_type ts = me->last_update_ts CHANGING buffer = me->buffer ). ENDMETHOD. METHOD setup_new_window_dates. me->window_start_date = zcl_re7_upd_ctrl=>gen_next_window_start_date( obj_type = me->obj_type last_update_ts = me->last_update_ts ). IF me->window_start_date IS INITIAL. me->window_start_date = zcl_re7_upd_ctrl=>gen_init_window_start_date( window_end_date = me->window_end_date ). ENDIF. ENDMETHOD. METHOD store_data_in_buffer. me->buffer = zcl_re7_storage_gateway=>save_buffer( m_type = me->m_type ts = received_ts buffer = received_data window_start_date = window_start_date window_end_date = window_end_date ). ENDMETHOD. ENDCLASS.'; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result var_dump($matches);

Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php