Find & Replace - Wildcards

<< Click to Display Table of Contents >>

Navigation:  Subtitling > Find, Replace and Go To >

Find & Replace - Wildcards

As mentioned in the previous topic, EZTitles allows wildcards characters to be used in a search. Remember, to activate the Wildcards checkbox to do so. Once it's clicked the Special button will appear which enlists all the wildcards that can be used:

Wildcards can be selected from the Special drop-down menu or they can be typed directly in the "Text to find" field.

Note: Some wildcards are designated by an additional symbol "^" while others are typed in without it like "+","*" and so on. If you need to search for one of these characters that don't need the special designator, then you need to add "\" backslash before it. For example, if you need to search for the asterisk sign "*", you need to type in "\*" when using wildcards. Otherwise, the percentage symbol will be associated with its special meaning of "start of line".

Note: Wildcards are case sensitive. There's a huge difference between "^d" and "^D" for example. Usually the wildcard with uppercase letter has the opposite meaning of the one with lowercase letter.

Below you can find brief description of all the available widlcards.

*

0 or more characters.

@

0 or more occurrences of the previous symbol/character.

+

1 or more occurrences of the previous symbol/character.

&

0 or 1 occurrences of the previous symbol/character.

 

 

<

Start of word.

>

End of word.

%

Start of line.

$

End of line.

^%

Start of subtitle.

^$

End of subtitle.

 

 

^?

Any character.

^d

Any digit.

^D

Any character that is not digit.

^w

Any word character (letter or digit).

^W

Any non-word character.

^s

Any whitespace character including new line.

^S

Any non-whitespace character.

^a

Any letter (not including digits).

^A

Any character that is not letter.

^u

Any uppercase letter.

^U

Any character that is not an uppercase letter.

^l

Any lowercase letter. The wildcard is constructed of "^" followed by a lowercase letter L.

^L

Any character that is not a lowercase letter.

^p

Any punctuation mark.

^P

Any character excluding punctuation marks.

 

 

^n

New line.

Regular Expressions

In addition to using Wildcards, EZTitles allows Regular Expressions too.

To use a regular expression, make sure to click the "Wildcards" checkbox first and then add "(?re)" before the expression in the Text to Find field:

You can use this article for the specific expressions that can be used this way.

Wildcards and Replace

Wildcards are typically used for finding specific parts of text but there are just a few that can be used for Replace as well. These are:

^n

Inserts new line

^&

Replaced by the text found. Here's an example:

Text to Find: John 

Replace with: (^&) 

Result: (John)

^0....^9

Specifies the subpattern of the regular expression that will replace the original text. Subpatters can be used only for regular expressions: use (?re) in the beginning of the Text to Find expression. For example:

Text to find: (?re)(\[)(.*)(\])

Replace with: (^2)

In this case, EZTitles will find any text enclosed in square brackets, the text inside the brackets will be matched as the 2nd subpattern of the regular expression and as a result, the square brackets will be replaced by parenthesis keeping the text between them. I.e. [John] becomes (John), [Eric]->(Eric), etc., all in the same time.

Change case for replaced text

EZTitles provides few options to help change character case for the replaced text, found text ^& or subpatterns ^0....^9:

\L - changes replaced text to lower case.

\U - changes replaced text to upper case.

\u - changes the first letter of replaced text to uppercase.

\l - changes first letter of replaced text to lowercase.

\u\L - changes first letter of replaced text to uppercase, while the rest are reset to lowercase.

\l\U - changes first letter of replaced text to lowercase, while the rest are reset to uppercase.