- Posted by
- Jeremyw, One thing - if you look at the last macro I gave you, all line endings were \n including ^(\d{8})\n because you were using a Unix file. In the one you show in the post above you have two that are \r\n , and the last one ( ^(\d{8})\n ) is \n. You can't mix these! If yours was working except ...Posted in Macros
-   Topics
-   Views
- Jane
Dec 09, 2008
- Your request should be easy enough to fill. Would it be easy enough to add that to the code to put 2 or 3 spaces after position 9? To do this you just have to put the spaces you need between the \1 and \2 in the replace string Is it possible to take the data on Row 1 (60336600) and move it to the li...Posted in Macros
-   Topics
-   Views
- Jane
Dec 04, 2008
- I'm not sure but it appears the problem may be with the line terminators in this new file which are \n rather than \r\n as in the first file. The following 2 regex lines in the macro won't match these. Find MatchCase RegExp "^DOCHEAD.+ \r\n " ... Find MatchCase RegExp "^OBINP200.+ \r\n " If you get ...Posted in Macros
-   Topics
-   Views
- Jane
Dec 04, 2008
- Sorry for the delay. Nobody seems to have responded with an Ultraedit solution. I've attached a file of the results (already deleted) , incorporating the OBINP100 line you wanted to capture. I'm not sure how your result file has a space between 00639409 and KZZ828064. This started as a solid string ...Posted in Macros
-   Topics
-   Views
- Jane
Dec 04, 2008
- Ok, Just so I'm clear, on the data you supplied, based on the column matching criteria you gave, you would delete all starting with OBINP200 except rows 9, 18, and 27 because these have all zeros at 537-550 - is that correct? Once it loops through every Line the begins with OBINP200 and deletes ever...Posted in Macros
-   Topics
-   Views
- Jane
Nov 26, 2008
- If you are using a more recent version which supports Perl regex, i.e. Version 12 or later, you can set it for Perl regular expressions and solve this a few ways. If you are looking for simple words of 1 to 3 characters, and the words are separated by non-word boundaries you could do it with the reg...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- Jane
Oct 28, 2008
- Thanks for explaining Tim. I should have included the lazy .+? but I find in long searches it tends to be a bit slower due to backtracking. However, my advice which depends on a bug in UltraEdit to get faster results is probably not the best long term advice.Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- Jane
Oct 23, 2008
- Using the Perl regex engine Search for: (?s)<notes>.+</notes>\r\n replace with: nothing should do the trick. Normally, if there were more than one set of <notes> </notes>, then this would be greedy and span the whole range, but because of a bug in the multiline support in Ultraedit it acts lazy and ...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- Jane
Oct 18, 2008
- As Mofi has suggested above, you could use a Perl Regular expression to save only the first 1051 characters per line in a search and replace. In the example you gave 1TX502 326071059.1 0000007911LACE BOBBY W 319 PINE (keep)2326071059.1 IL0030803078 G W ENGLISH/III,MD (remove) 1TX502 326071059.1 0000...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- Jane
Apr 27, 2008
- I contacted IDM support about this issue and they informed me that the negative look behinds are not currently supported in UltraEdit's Perl Regular Expressions So a negative lookbehind like (?<!\r\n)^Test A will not work until that is rectified. JanePosted in Scripts
-   Topics
-   Views
- Jane
Apr 03, 2008
- Tim I think it may be a bug in the implementation of the Perl regex by UE. I tried the regex (?<!\r\n)^Test A in a couple of other text editors which have the PCRE regex package and they all work as they should - i.e. they will match the very first entry only. JanePosted in Scripts
-   Topics
-   Views
- Jane
Apr 02, 2008
- The problem with using [ \t]+ is that it matches and wastes time replacing all single spaces with single spaces. To match only the criteria multiple spaces\tabs and single tabs it would probably be better to use [ \t]{2,}|\t in the search box and replace with single space. This will skip all single ...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- Jane
Mar 26, 2008
- Tim, I'm puzzled about your use of ÿ in the negated character set. Why couldn't you just use a negated quote: i.e. "[^"]*?" Using your lazy quantifier it would single step from the first quote until it hit the second one. Maybe I'm missing something here? Cordially, janePosted in Find/Replace/Regular Expressions
-   Topics
-   Views
- Jane
Mar 20, 2008
- I could be wrong, but I think the ?: just creates a non-capturing group. It will work without it, but you'll waste resources saving the capture. The iteration is caused by having the + outside the parenthesis rather than inside. If you put it inside i.e.\b(?:(?!Temp)\w+)\b you will only avoid words ...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- Jane
Mar 20, 2008
- I noticed something interesting when playing with this problem. I have a directory filled with *.TXT files. I shortened one file extension to TX and lengthened one to TXTEST. If I do a search in files named *.TX it only looks in that one file , it doesn't touch the TXT files. If I do a search in *.T...Posted in Find/Replace/Regular Expressions
-   Topics
-   Views
- Jane
Feb 14, 2008