1/12/2024 0 Comments Npm string replacer![]() The full match will be available as a javascript variable named $0 while each captured group will be available as $1, $2, $3. Purposefully implemented the most insecure way possible to remove any incentive to consider running code from an untrusted part. The statement from the last expression will become the replacement string. replacement-js Treat replacement as javascript source code. You still need to provide a dummy value (like _) as replacement parameter. ![]() replacement-pipe Replacement will be piped in. If piped data only consists of chars that can be trimmed (new line, space, tabs.) it will become an empty string. trim-pipe Trim piped data before processing. If search pattern does contain matching groups only matching groups will be outputted (same line with no delimiter). If search pattern does not contain matching groups the full match will be outputted. Will not replace any content but you still need to provide a dummy value (like _) as replacement parameter. output-match Output each match on a new line. keep-backup Keep a backup file of the original content. Works async (independent of -A flag) and will speed up things but at one point data lives only in memory, and you will lose the content if the process is abrupted. void-backup Avoid temporary backing up file. Good to limit memory usage when handling large files. void-async Handle files in a synchronous flow. Will also output content even if no replacement has taken place. output Output the final result instead of saving to file. void-section Void having § as alias for \ in pattern and replacement parameters void-euro Void having € as alias for $ in pattern and replacement parameters ![]() quiet-total Never display errors or info quiet Only display errors (no other info) unicode Treat pattern as a sequence of unicode code points. Makes ^ and $ match start/end of whole content rather than each line. void-multiline Void multiline search pattern. void-global Void global search (stop looking after the first match). void-ignore-case Void case insensitive search pattern. literal Literal string search (no regex used when searching) version Print rexreplace version (can be given as only argument)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |