Difference between revisions of "ReNamer:Examples of Rules"
Jump to navigation
Jump to search
m |
(__FORCETOC__) |
||
Line 3: | Line 3: | ||
This article is a collection of examples of rules for various common tasks. | This article is a collection of examples of rules for various common tasks. | ||
+ | |||
+ | __FORCETOC__ | ||
=== Remove first word === | === Remove first word === |
Revision as of 12:11, 17 December 2013
This article is a collection of examples of rules for various common tasks.
Remove first word
If the words are separated by spaced then you can use Delete rule, by deleting everything up to the next space.
1) Delete: Delete from Position 1 until Delimiter " " (skip extension)
Alternatively, this can be achieved with a RegEx rule:
1) RegEx: Replace expression "\A[^\s]+\s*" with "" (skip extension)
Examples:
Input | Output |
---|---|
Example File Name | File Name |
Remove first 3 words
If the words are separated by spaced then you can use 3 Delete rules, with each one deleting everything up to the next space.
1) Delete: Delete from Position 1 until Delimiter " " (skip extension) 2) Delete: Delete from Position 1 until Delimiter " " (skip extension) 3) Delete: Delete from Position 1 until Delimiter " " (skip extension)
Alternatively, this can be achieved with a single RegEx rule:
1) RegEx: Replace expression "\A[^\s]+\s+[^\s]+\s+[^\s]+\s*" with "" (skip extension)
Examples:
Input | Output |
---|---|
The quick brown fox jumps over the lazy dog | fox jumps over the lazy dog |
Remove last 3 words
If the words are separated by spaced then you can use 3 Delete rules, with each one deleting everything up to the next space, but operating in "right-to-left" mode.
1) Delete: Delete from Position 1 until Delimiter " " (right-to-left) (skip extension) 2) Delete: Delete from Position 1 until Delimiter " " (right-to-left) (skip extension) 3) Delete: Delete from Position 1 until Delimiter " " (right-to-left) (skip extension)
Alternatively, this can be achieved with a single RegEx rule:
1) RegEx: Replace expression "\s*[^\s]+\s+[^\s]+\s+[^\s]+\Z" with "" (skip extension)
Examples:
Input | Output |
---|---|
The quick brown fox jumps over the lazy dog | The quick brown fox jumps over |