-
Notifications
You must be signed in to change notification settings - Fork 44
Closed
Milestone
Description
When using the search-replace command with the --regex option, it uses preg_replace() / preg_replace_callback() to replace all occurrences in a row.
There might be situations where you only want that replacement to happen a certain amount of times (e.g. only once per row).
preg_replace_callback() and preg_replace() have a $limit parameter that could be used for this and defaults to -1 (no limit).
Suggestion: Allow modifying this $limit parameter using a new --regex-limit argument. That should be rather trivial (just pass the value to the function), but needs some testing obviously.
Reactions are currently unavailable