• Eike Rathke's avatar
    Support occurrence number as REGEX() 4th argument, tdf#113977 follow-up · e18c4c5f
    Eike Rathke yazdı
    REGEX( Text ; Expression [ ; [ Replacement ] [ ; Flags|Occurrence ] ] )
    
    REGEX(Text;Expression) extracts the first match of Expression in
    Text. If there is no match, #N/A is returned.
    
    REGEX(Text;Expression;Replacement) replaces the first match of
    Expression in Text, not extracted. If there is no match, Text is
    returned unmodified.
    
    REGEX(Text;Expression;Replacement;"g") replaces all matches of
    Expression in Text with Replacement, not extracted. If there is no
    match, Text is returned unmodified.
    
    REGEX(Text;Expression;;Occurrence) extracts the n-th match of
    Expression in Text. If there is no n-th match, #N/A is returned.
    If Occurrence is 0, Text is returned unmodified.
    
    REGEX(Text;Expression;Replacement;Occurrence) replaces the n-th
    match of Expression in Text with Replacement, not extracted. If
    there is no n-th match, Text is returned unmodified. If Occurrence
    is 0, Text is returned unmodified.
    
    Change-Id: Iadb705e4c76415c57bf510489410ec029344cca7
    Reviewed-on: https://gerrit.libreoffice.org/64199Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit e3af4947)
    Reviewed-on: https://gerrit.libreoffice.org/64219
    e18c4c5f