Friday, 28 January 2011

Filtering in the Studio editor

You can use regular expressions in Studio to filter what you want to see/edit in the Editor view.
If you do not see the Filter toolbar, use View/Toolbars/Display Filter.
You will now see a field called Containing:
This field can be used for writing search criteria and/or regular expressions. Write something in the field and hit return.
Try the following:
\d                                           Shows all lines that contains numbers or numbers + text. Text only units are excluded. Same as [0-9].
^[0-9]                                     Shows lines starting with numbers
^([-+] ?)?[0-9]+(,[0-9]+)?$       Shows +/- integers and decimal comma numbers
^([-+] ?)?[.0-9]+(.[0-9]+)?$       Shows +/- integers, comma and dot numbers [corrected expression]
^([-+] ?)?[.0-9]+(.[0-9]+)?$      Shows also headers like 1.2.3
^\d+\d+\d+$                            Shows integers only, without sign              

To produce the sign ^, copy from here or use Alt94

Regular expressions in Studio
It is also possible to use regular expressions for other functions in Studio:
- Filtering text files when defining a new job/adding files
- Defining segmentation rules
- In the Search/Replace function
More on Regex:
Also see Tuomas' findings on this subject:


0 comments:

Post a Comment