I need an regex to find <Field ...name="document">
or <FieldArray ...name="document">
to replace with an empty string. They can be defined across multiple lines.
This is not html or xhtml, it's just a text string containing <Field>
and <FieldArray>
Example with Field:
<Field
component={FormField}
name="document"
typeInput="selectAutocomplete"
/>
Example with FieldArray:
<FieldArray
component={FormField}
typeInput="selectAutocomplete"
name="document"
/>
the are inside a list of components. Example:
<Field
name="amount"
component={FormField}
label={t('form.amount')}
/>
<Field
name="datereception"
component={FormField}
label={t('form.datereception')}
/>
<Field
component={FormField}
name="document"
typeInput="selectAutocomplete"
/>
<Field
name="datedeferred"
component={FormField}
label={t('form.datedeferred')}
/>
I've have read some solutions like to find src in Extract image src from a string but his structure is different a what i'm looing for.