- Posted by
- 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
- Hi, do I understand you correctly that you need to highlight all unusual ASCII characters from range x00-x21? Ideally like Notepad++? BR, FleggyPosted in UltraEdit General Discussion
-   Topics
-   Views
- fleggy
Oct 19, 2022
- well, considering all mentioned rules this Perl regexp matches whole numbers (?<!Chapter )(?<![ `.\d])\d+(?=[ )]) I added \d to the negative lookbehind to eliminate false positives like 59 in 1.359. I don't use scripts so I can't help you with it, sorry... BR, FleggyPosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Sep 27, 2022
- Hi, just two things: 1) do not use "|" as an OR in a character class. Simply put all required characters/intervals inside []. For example [ `\.] 2) I do not understand why you use a script when Replace All should be enough. and 3) :) I have zero DTP skills and knowledge yet it seems to me that your ...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Sep 26, 2022
- Hi, this Perl Replace All replaces all footnotes at once. But preserves the list of footnotes at the end of file so you have to delete them separately. F: <<--(?<FNnum>\d+)-->>(?=(?s:.*?)(?<footnote>^\[\k<FNnum>\].*)) R: <<--$+{footnote}>> or if you really wish to keep the placeholder number. Or tai...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- fleggy
Sep 22, 2022