Difference between revisions of "ReNamer:Rules:RegEx"

From den4b Wiki
Jump to: navigation, search
(RegEx Rule)
m (Reverted edits by Stefan (talk) to last revision by Den4b)
(Tag: Rollback)
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== RegEx Rule ==
+
{{Go|up=ReNamer:Rules|prev=ReNamer:Rules:Translit|next=ReNamer:Rules:PascalScript}}
<center>[[Image:RegExRule.png]]</center>
 
  
This rule finds text that matches the specified RegEx pattern, and replaces it with another string. (''RegEx'' is short for '''Regular Expressions''').  
+
[[Image:RegExRule.png|center]]
  
The RegEx syntax is explained [http://den4b.com/wiki/index.php/ReNamer:Regular_Expressions here].
+
This rule finds text that matches the specified RegEx pattern, and replaces it with another string. RegEx is short for '''Regular Expressions''', which stands for special syntax for describing search and replace patterns. Regular Expressions are very powerful and they are ''really'' worth learning. The [[ReNamer:Regular Expressions|RegEx syntax]] is explained in the appendix.  
  
The ReNamer users have contributed many [http://www.den4b.com/forum/index.php RegEx patterns] for various purposes. You can copy and use them.
+
'''Note:''' The [http://www.regexpstudio.com/ TRegExpr] RegEx engine used by ReNamer is a little different from the standard [http://perldoc.perl.org/perlre.html PERL RegEx] or [http://msdn.microsoft.com/en-us/library/6wzad2b2(VS.85).aspx Windows RegEx]. You may check the correct syntax in [[ReNamer:Regular Expressions|Regular Expressions]] section.
  
The parameters are as follows:
+
The parameters are as follows:  
 
 
{| class="prettytable"
 
| <center>'''Parameter'''</center>
 
| <center>'''Details'''</center>
 
  
 +
{| class="wikitable"
 +
|-
 +
! Parameter
 +
! Details
 
|-
 
|-
| Expression
+
| Expression  
| RegEx pattern to match (find).
+
| RegEx pattern to match or find.
 
 
 
|-
 
|-
| Replace
+
| Replace  
 
| RegEx pattern that replaces the found pattern.
 
| RegEx pattern that replaces the found pattern.
 +
|-
 +
| Skip extension
 +
| If this check box is selected, the extension will be ignored by the rule.
 +
|-
 +
| Case-sensitive
 +
| If this option is selected, ReNamer will search for the text in ''case-sensitive'' manner.
 +
|}
  
|-
+
A simple set of commonly used RegEx syntax patterns is provided in the hint menu:
| Skip extension
+
 
| If this check box is unselected, the extension will be included in the rule.
+
[[File:RegExRuleSyntaxHint.png]]
 +
 
 +
'''Tip:''' ReNamer users have posted many RegEx patterns at the [http://www.den4b.com/forum/ User Forum]. You can copy and use them.
  
|}
+
[[Category:ReNamer]]

Latest revision as of 22:32, 8 July 2019

RegExRule.png

This rule finds text that matches the specified RegEx pattern, and replaces it with another string. RegEx is short for Regular Expressions, which stands for special syntax for describing search and replace patterns. Regular Expressions are very powerful and they are really worth learning. The RegEx syntax is explained in the appendix.

Note: The TRegExpr RegEx engine used by ReNamer is a little different from the standard PERL RegEx or Windows RegEx. You may check the correct syntax in Regular Expressions section.

The parameters are as follows:

Parameter Details
Expression RegEx pattern to match or find.
Replace RegEx pattern that replaces the found pattern.
Skip extension If this check box is selected, the extension will be ignored by the rule.
Case-sensitive If this option is selected, ReNamer will search for the text in case-sensitive manner.

A simple set of commonly used RegEx syntax patterns is provided in the hint menu:

RegExRuleSyntaxHint.png

Tip: ReNamer users have posted many RegEx patterns at the User Forum. You can copy and use them.