Skip to Content
0
Aug 04, 2008 at 03:01 PM

RegEx with cl_abap_matcher - not getting proper result

130 Views

I am using the following RegEx for validating date from PHP page

But it is not working. But if i am doing same in the DEMO_REGEX_TOY

it is giving correct result.

" Here text-116 contains the following RegEx
" ' (0?[1-9]|1[012])[- /.](0?[1-9]|[12][0-9]|3[01])[- /.](19|20)?[0-9]{2} '

    concatenate text-116 space into p_regex.
    condense p_regex.
    create object regex
      exporting
        pattern     = p_regex
        ignore_case = ''.
* For REGEX match
    matcher = cl_abap_matcher=>create(
                   pattern     = p_regex
                   table       = i_files ).
    lt_result = matcher->find_all( ).
    if lines( lt_result ) gt 0.
      v_exist = 'Y'.
    endif.
  endif.

Any Info ??

a®s

Edited by: a®s on Aug 4, 2008 11:25 AM