FIND AND REPLACE SOME CHARACTERS SET OF NUMBER IN NOTEPAD ++
-
Hi I have this problem in this set of numbers 200928 (…); 200928 in the round brackets there are 3 numbers that can always change.
I want to replace it with 200930 (…); 200930, but I don’t want to replace the numbers inside the round brackets.
Can anyone help me?
thanks a lot -
Provide sample BEFORE and AFTER sections of text.
Ideally use the</>
button in the compose toolbar after composing and selecting each section in turn. -
Thanks for the reply but it is not text they are numbers
-
but it is not text they are numbers
My first thought was LOL.
So here are some numbers expressed as text:
20113 38245 39134 18046 98704 49232 57694 86475 45320 33393
See if you can provide us a similar example for YOUR numbers, including having it black-boxed. I have doubt.
-
If you’re wondering why you haven’t gotten any specific search-and-replace syntax yet, and instead are being asked for clarification, it’s because you haven’t given us enough to go on.
Please read and follow the advice below. The extent to which you read, understand, and follow the advice below will be the extent to which we will be able to help you.
----
Do you want regex search/replace help? Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you. All example text should be marked as plain text using the
</>
toolbar button or manual Markdown syntax. Screenshots can be pasted from the clipboard to your post usingCtrl+V
to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. Show the data you have and the text you want to get from that data; include examples of things that should match and be transformed, and things that don’t match and should be left alone; show edge cases and make sure you examples are as varied as your real data. Show the regex you already tried, and why you thought it should work; tell us what’s wrong with what you do get… Read the official NPP Searching / Regex docs and the forum’s Regular Expression FAQ. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries. -
I apologize if I was not clear enough. I try to explain myself. In several files I have this sequence of numbers 200928017;200928. These 3 numbers 017 in the other files always change, but I don’t want to change them.
I would just like to change the date and the result I would like this to be 200930017;200930.
using NOTEPAD++ -
This post is deleted! -
Since your example was minimalistic, here’s a minimalistic answer. If you want detail, or it doesn’t work for you, you’ll have to give us more to go with.
- FIND =
200928(.*?;)200928
- REPLACE =
200930${1}200930
- Search Mode = regular expression
- FIND =
-
Thanks Peter that’s just what I was looking for, it works perfectly. thanks a lot