- Posted by
- Or simply set the file R as Read Only ;)Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
5:47 - Aug 30
- Hi Emorway, Just out of curiosity - why not Perl regexp? Thanks, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
8:37 - Aug 29
- Hi Edvard, it is not clear how the element c13 (or similar which should be corrected) could look like. I suppose the simplest scenario - there are no nested elements and no EOLs inside the element body. Here is a Perl regexp which finds such lines and remove leading spaces from the body. Find: (?<TA...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
9:18 - Jul 22
- Hello, I suggest a little modification of Mofi's solution: F: (^drop materialized view +)(.+)(\r?\n/\r?\n)(?!drop table \2$) R: \1\2\3drop table \2\3 This regexp checks if the dropping table name is exactly same as the view name, just in case. And the match should start at the beginning of line (sim...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
20:38 - Jun 28
- Just a little note - I suggest to use backreferences for reused matches like date/time field separators in your case. It is more convenient and safer. E.g. Mofi's regexp [12][0-9]{3}-[01][0-9]-[0-3][0-9] [0-2][0-9]:[0-5][0-9]:[0-5][0-9] and the modified version [12][0-9]{3}(-)[01][0-9]\1[0-3][0-9] [...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
23:26 - Jan 29
- Hi, I created a new UTF-8 file (Linux EOL) and pasted your sample. Then this Perl regexp Replace All worked fine:| F: .\K R: \n Tested in UE 2023.2.0.22 64-bit for Windows BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
21:24 - Jan 23
- Hi, Because there is no feature to count characters inside the string matched by a Perl regular expression you must consider the worst case when the third column is only one character long so the first added value 0.025 must be preceded by seven spaces. Then the second regexp replace removes the ext...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
21:03 - Jan 23
- Hi Ashyukun, I suppose there are the same characters at the beginning of each line you want to change. If the column number in all such lines is same then you should be able to write a simple perl regexp Find/Replace regardless how much you know about regexes. Find: ^starting_characters.{count_of_sk...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
10:39 - Jan 23
- For example a Perl regexp will help you. Find what: word1|word2 check Highlight all items found click NextPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Dec 08, 2023
- Hi, for example this Perl regexp: (?<!\d)(\d[^\r\n\d]{0,3}){9}\d(?!\d) I limited the maximum count of non-digit chars to 3 but you can adjust it as you wish. I also added lookarounds to check that there are not other digits before and after a match. BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jul 05, 2023
- Hi Mofi, AFAIK Notepad++ also uses Boosts library and conditional replace works in it. For example this simple test: F: (lo)|mo R: (?1matched:unmatched) in text hello Mofi -> hel matched unmatched fi :) BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Jun 16, 2023
- Hi DougEamon, There are many different Perl regexp libraries. UES, UE and some other editors use Boost Perl regexp library which has a different syntax for Replace Conditionals . Unfortunately UE(S) does not support this feature. Conditionals work only in the search pattern. BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Apr 17, 2023
- Hi Jarva, Mofi's regexes are ok but if you want to use a more exact pattern then the following one (Perl syntax) could be useful. And it also demonstrates the use of DEFINE ;) F: (?(DEFINE)(?<refnum>\d+(?:-\d+)?)) +\[(?&refnum)(?:,(?&refnum))*\] R: <leave it empty> This pattern respects the inner s...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Apr 14, 2023
- Hi, nested <b> tags are not allowed? In other words - is it enough to test a pattern <b>....<b>....</b> because there are no patterns <b>...<b>...</b>...</b>? EDIT: the text inside <b>...<b> can contain more lines? And the tag <RF> before the first <b> is mandatory? Thanks, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Mar 20, 2023
- Just be careful because ? itself can be used as a quantifier as well. Personally, I suggest to think of quantifiers in this way: greedy * any to 0 + any to 1 ? 1 to 0 {n,m} m to n non-greedy *? 0 to any +? 1 to any ?? 0 to 1 {n,m}? n to m I believe It helps to better understand how the r...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Mar 11, 2023