Substitution list (Recode widget)¶
The keys (and associated values) for the file lists are the following:
Key |
Type |
Default |
Value |
Remark |
---|---|---|---|---|
regex |
string |
— |
regular expression |
be careful to escape the slashes and backslash |
replacement_string |
string |
replacement string |
— |
|
ignore_case |
Boolean |
false |
option -i |
|
multiline |
Boolean |
false |
option -m |
|
dot_all |
Boolean |
false |
option -s |
|
unicode_dependent |
Boolean |
false |
option -u |
Example:
[
{
"regex": "<.+?>",
"replacement_string": ""
},
{
"regex": "(behavi|col|neighb)our",
"replacement_string": "&1or",
"ignore_case": true,
"unicode_dependent": true
},
{
"regex": "a (\\w+) of mine",
"replacement_string": "my &1",
"unicode_dependent": true
}
]