this is a test;delete all of this test line two; this I want ; delete all of this regular epxressions;are;great; when; you;know;how;to;use;them;delete this stuff
I want to delete after the last semicolon on each line.
I am using UE 14.10.1.0.1024
I suggest a Perl regular expression search string [^;\r\n]+$ and an empty replace string. That would not change the current line ending format.
There is a help page about Perl regular expression in help of UltraEdit, but here is a short explanation.
Square brackets [...] means find any character specified inside the brackets.
If the first character after [ is ^ then the meaning is reversed. So [^...] means find any character except those specified inside the brackets.
\r is the character code for the character carriage return. \n is the character code for the character line-feed.
So [^;\r\n] means find 1 character which is not a semicolon, not a carriage return and not a line-feed.
The + after the bracket means find the previous expression 1 or more times (* means 0 or more times). Because the previous expression means any character except semicolon, CR and LF, this regular expression selects now all strings not containing these 3 characters. But we want to find only those strings on end of line.
So the last regex character $, which means end of line without selecting the line ending characters, anchors the search to the end of the line.
Best regards from an UC/UE/UES for Windows user from Austria
and replace with nothing. The positive lookbehind expression (?<=;) makes sure that there is in fact a semicolon after which to delete the rest of the line. Otherwise, lines that don't contain a semicolon will be deleted entirely (save the CRLF).
If that's what is requested - but sklad2 wrote it that way