N
N
Newsonya2013-12-12 11:52:14
Regular Expressions
Newsonya, 2013-12-12 11:52:14

How to write a regular expression for search-replace in a text editor?

Greetings!
I want to transfer home accounting to easyfinance, for this I unload statements from the client bank, and then I pull them into the program. But there is a problem if the line contains a transaction in a currency. We need to correct the lines in the extract a little. For example, there is this line:

;06.12 13:26 ;-USD167.24 (5481.83) ;;Платеж в MasterCard ;Ali: Видеорегистратор 16кан USD167.24 ;  ;

gotta get
;06.12 13:26 ;-5481.83 ;;Платеж в MasterCard ;Ali: Видеорегистратор 16кан USD167.24 ;  ;

That is, throw out the price in dollars and remove the brackets.
Can you tell me how to do this using regular expressions in a text editor?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Mosyukov, 2013-12-12
@Newsonya

Find: USD\d+\.?\d*\s\((.*?)\). Replace with: $1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question