Notepad++ moving letters from the end of text to the begining - numbers

i have a text file with values that start a few digits and end with a letter or two at maximum.
i need to move those letters to the front.
Original data looks like this:
56465A
498558DF
90255C
and need them to become like:
A56465
DF498558
C90255
thank you

Try capturing the leading numbers and trailing uppercase letters in a word, in two separate capture groups. Then, replace with the numbers and letters swapped.
Find: \b(\d+)([A-Z]+)\b
Replace: $2$1
Edit:
If the group of letters could appear anywhere in the string, then we can use a slightly more complex pattern:
Find: \b(\d*)([A-Z]+)(\d*)\b
Replace: $2$1$3

Related

Lines that have three upper case characters in parenthesis like (LTI) - remember to escape certain characters :)

In this assignment you will create a regular expression to retrieve a subset data from the purpose column of the taxdata table in the readonly database (access details below). Write a regular expressions to retrieve that meet the following criteria:
Lines that have three upper case characters in parenthesis like (LTI) - remember to escape certain characters :)
Lines that have three upper case characters in parenthesis like (LTI) - remember to escape certain characters :)

Difficulty forming a regular expression

I'm trying to check a string to make sure that it only contains lowercase and uppercased letters, the digits 0-9, underscores, dashes and periods.
The regular expression I've been using for letter, numbers, underscores and dashes works fine and is this:
"[^a-zA-Z0-9_-]"
I'm having difficulty adding the check for spaces and periods though.
I've tried:
"[^a-zA-Z0-9_- ]" (added a space after the dash)
"[^a-zA-Z0-9_-\s\.]" (trying to escape a white space character)
I've also tried putting the \s and \. outside of the main block and also in blocks of their own.
Thanks for any advice.
A hyphen (representing the character) must be at the beginning or at the end of the (negating) character class.
Inside a character class the period is a normal character, it doesn't need to be escaped.
let pattern = "[^a-zA-Z0-9_. -]+"
Be careful about adding characters which have a special meaning: you forgot the hyphen.
I think that this is what you are looking for:
"[\^ a-zA-Z0-9_,\.\-]"

How to Create Mask for MaskedEditExtender for Special Characters?

Suppose I want to allow the user to enter numbers, letters, and some special characters like *, $.
Plus limit to 3 characters.
How do I create a Mask for the AjaxControlToolKit MaskedEditExtender to allow only those characters?
I thought the mask would look something like:
"{9$\*\$}{9$\*\$}{9$\*\$}"
I started with this:
"{9$}{9$}{9$}"
I can't enter any characters into the TextBox.
According to one article the {} characters are "repetition delimiters".
So I thought using those parens was the correct syntax usage for setting the mask to allow a set of characters for a single character position in the textbox.
Thanks, Ed
The solution is to use the FilteredTextBoxExtender.
Ed

How can I use sed to replace a word between periods without spaces?

I have a large document (Johnson's DICTIONARY OF THE ENGLISH LANGUAGE) that has a large number of typos in this format:
MITHRIDATE (MI'THRIDATE) n.s.[mithridate, Fr.] Mithridate is one of the capital medicines of the shops, consisting of a great number of ingredients, and has its name from its inventor Mithridates, king of Pontus.Quincy.
where there is a proper name like Quincy beginning with a capital letter surrounded by periods that do not have spaces.
I want to change all the occurrences like .Quincy. to . Quincy. without changing the items like n.s. to n. s..
I am willing to ignore the possibly lacking space after the s. in n.s.[mithridate].
I have tried various combinations of character classes and back references without success.

Notepad++ how to swap characters in a string

I have a computer generated text file. I need to swap positions of certain entries. These entries are always 4 characters long and separated from the rest by semicolons. The 4th character needs to become the first character.
For example:
;1234;
has to become:
;4123;
Note: There's a lot of other text separated by semicolons, but only these are exactly 4 characters long. The rest is longer or shorter
Have a try with:
Find what: ;(\d\d\d)(\d);
Replace with: ;$2$1;