Problem/Motivation

As described in #3263910: Credit for Add a process plugin to skip on regular expression, the callback condition can be used to handle regex. It's really clumsy though and I finally got the motivation to add a dedicated matches condition that uses regex.

Proposed resolution

Add a matches condition that uses the following syntax:

 process:
   has_a_digit:
     plugin: evaluate_condition
     condition:
       plugin: matches
       regex: '/\d+/'
     source: source_string

It should validate that regex exists and is a valid regex string in the constructor. It should validate that the source is a string during migration.

User interface changes

N/A

API changes

New migration_condition plugin available!

Data model changes

N/A

Comments

danflanagan8 created an issue. See original summary.

danflanagan8’s picture

Assigned: danflanagan8 » Unassigned
Status: Active » Needs review
StatusFileSize
new4.07 KB

Here's a patch-a-roo

  • danflanagan8 committed 5eb8c43 on 2.0.x
    Issue #3312705 by danflanagan8: Add a real regex condition instead of...
danflanagan8’s picture

Status: Needs review » Fixed

Should be good.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.