Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Overview

The search and Replace window provides controls to quickly find specific or partial text in accordance with defined search options, then replace that text with specified new text.

Access

The search and replace window can be opened by selecting the Search and Replace option from the segment grid column header menu, or via translate5 shortcuts:

  • ctrl+f - open search and replace window with focus on the search tab
  • ctrl+h - open search and replace window with focus on the replace tab

Options/Controls


  • Search for: Use this field to enter the text string that you want to search for. Either enter the full word or search for a partial string.


  • Replace: Use this field to enter the replacement text string. The entered text  will completely replace the resulting text string found (attention when using wildcards or regular expressions!!!)


  • Search in: Use this field to define on which translate5 column the search will be performed. In the replace tab only the editable columns are available.


  • Match case: Enable this option to perform a case-sensitive search, meaning the found text must match the case of the search text entered into the Search for field.


  • Search towards the top: Navigate towards the top of the segment grid when jumping to the next match


  • Use for search:
    • Normal search: Match the string given in the Search field
    • Wildcards: The string can contain the wildcard characters 
      • ? (single character) 
      • * (any group of characters)
    • Regular expression: The search string is interpreted as a MySQL regular expression, except some regular expressions, that are black-listed for technical reasons.
      • Please see the MySQL regular expression documentation for details on how to use regular expressions
      • The following list contains the regular expressions which are not supported by translate5, because they are black-listed:

        Blacklisted regular expressions
                /\\x[a-fA-F0-9]{2}/g,//Hexadecimal escape | \xFF where FF are 2 hexadecimal digits | Matches the character at the specified position in the code page  |  \xA9 matches © when using the Latin-1 code page
                /\\n/g,//Character escape
                /\\r/g,//Character escape
                /\\t/g,//Character escape
                /\\f/g,//Character escape
                /\\v/g,//Character escape
                /\\c[a-zA-Z]/g,//Control character escape \cA through \cZ Match an ASCII character Control+A through Control+Z, equivalent to \x01 through \x1A   \cM\cJ matches a Windows CRLF line break
                //Control character escape \ca through \cz Match an ASCII character Control+A through Control+Z, equivalent to \x01 through \x1A   \cm\cj matches a Windows CRLF line break
                /\\0/g,//NULL escape
                /\\(?:[1-7][0-7]{0,2}|[0-7]{2,3})/g,//Octal escape
                /(.*)\|(.*)/g,//javascript: a|ab matches a in ab | In POSIX ERE: a|ab matches ab in ab
                /\\[\^\]\-]/g,//\ (backslash) followed by any of ^-]\
                /\\b/g,//javascript: [\b\t] matches a backspace or a tab character.
                /\\B/g,//javascript: \B. matches b, c, e, and f in abc def
                /\\d/g,//Shorthand Character Classes
                /\\D/g,//Shorthand Character Classes
                /\\s/g,//Shorthand Character Classes
                /\\S/g,//Shorthand Character Classes
                /\\w/g,//Shorthand Character Classes
                /\\W/g,//Shorthand Character Classes
                /\\h/g,//Shorthand Character Classes
                /\?\?/g,//abc?? matches ab or abc
                /\*\?/g,//".*?" matches "def" and "ghi" in abc "def" "ghi" jkl
                /\+\?/g,//".+?" matches "def" and "ghi" in abc "def" "ghi" jkl
                /{[0-9],[0-9]}\?/g,
                /{[0-9],}\?/g,
                /\\u[a-fA-F0-9]{4}/g,//Matches a specific Unicode code point.
                /\(\?\:.*?\)/g,//Non-capturing parentheses group the regex so you can apply regex operators, but do not capture anything.
                /\(.*?\)=\\[0-9]/g,//(abc|def)=\1 matches abc=abc or def=def, but not abc=def or def=abc.
                /\(\?\=.*?\)/g,//Matches at a position where the pattern inside the lookahead can be matched. Matches only the position. It does not consume any characters or expand the match. In a pattern like one(?=two)three, both two and three have to match at the position where the match of one ends.
                /\(\?\!.*?\)/g,//Similar to positive lookahead, except that negative lookahead only succeeds if the regex inside the lookahead fails to match.
                /\[\:(.*)\:\]/g,
      • The following table illustrates some commonly used metacharacters and constructs in a regular expression.

        MetacharacterBehavior
        ^matches the position at the beginning of the searched string
        $matches the position at the end of the searched string
        […]matches any character specified inside the square brackets
        [^…]matches any character not specified inside the square brackets
        *matches the preceding character zero or more times
        +matches preceding character one or more times
        {n}matches n number of instances of the preceding character
        {m,n}matches from m to n number of instances of the preceding character

         

  • Save segment on close: If checked (by default yes), the segment will be saved when is closed via search navigation

  • Search on locked segments: If checked, segments that are locked for editing are searched, too.
  • No labels