Find all . between the start of the line and the first occurence : and find all " " between the start of the line and the first occurence :
Here is the data I currently have (“before” data):
tokenized files: "toto.properties" spring.flyway.tata: "classpath:/xxxx/oracle" spring.flyway.toto: "classpath:/xxxx/oracle" spring.flyway.tata: "EN" spring.flyway.schemas: "OWNEN" spring.flyway.titi.aper: "APLEN" spring.flyway.titi.aplr: "AP" spring.flyway.titi.user: "APL" db.url: "jdbc:oracle:thin:@.fr.pop.intra:12232/1"
Here is how I would like that data to look (“after” data):
I have two needs 1-> i would like to find all . between the start of the line and the first occurence ":" 2->i would like to find all " " between the start of the line and the first occurence ":"
So the result shoule be this way
To accomplish this, I have tried using the following Find/Replace expressions and settings
The problem is notepad++ give me also this result
Could you please help me to find the right expression?
Thank in advance
Hello, @long-manith-srey and All,
From your post, we can merge your two needs, saying :
From start of any line, I would like to find all
dotcharacters which come before the first occurrence of the
If so, I think that the following regex does the expected job !
Move to or open your file
If necessary, move to its very beginning with the
Ctrl + Homeshortcut ( IMPORTANT because of the negative look-ahead
Open the Find or Mark dialog (
Ctrl + F/
Ctrl + M)
SEARCH or MARK
Untick all options
Regular expressionsearch mode
Click on the
Find All in Current Documentor on the
Of course, we’ll be able, to tune this regex, next time, in order to prevent from some matches or to get some additional matches, if any !
On the other hand, the FR regex
[ .]could be expressed differently if you need replacement and separate characters for the
Using the notation from this generic regex, we have :
[^:\r\n]. Note that we could have used the
((?!:).)+?syntax, instead, but the former syntax is more simple !
So the alternate regex is
Thank you so much*It’s perfect :)