Find And Replace with Regular Expression is problematic (perhaps there is a bug?)

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
mrcat
Posts: 7
Joined: Fri 16 Jul 2021 08:29

Find And Replace with Regular Expression is problematic (perhaps there is a bug?)

Post by mrcat » Fri 16 Jul 2021 13:56

Sorry but I'm trying to use "Find And Replace" with Regular Expression and I have some problem.

In my document I have this text:

SELECT
table1.*, table2.*, table3.*
FROM
table1
Inner Join table2
Inner Join table3 ON
table2.id2 = table3.id3 ON table1.id1 = table3.id3


I read your instructions:
https://docs.devart.com/studio-for-mysq ... place.html

but If I use
^ beginning of line
I see the message: " the specified text was not found"

But there are 7 lines!!

I have same problems with
$ End of Line

No problems using others syntax (for example < Beginning of word)
What am I doing wrong?

There is a bug or I'm using wrong syntax?

I use the symbol ^ to find all beginning of line, without any other character. it is true? or not?

dzhanhira
Devart Team
Posts: 239
Joined: Mon 26 Oct 2020 13:49

Re: Find And Replace with Regular Expression is problematic (perhaps there is a bug?)

Post by dzhanhira » Tue 20 Jul 2021 11:26

It's not a bug, this is a intended behavior.
^ and $ are just anchors that are used to bind the search to the position of the searched text, but it's pointless to search for them separately without the text

mrcat
Posts: 7
Joined: Fri 16 Jul 2021 08:29

Re: Find And Replace with Regular Expression is problematic (perhaps there is a bug?)

Post by mrcat » Tue 20 Jul 2021 12:22

dzhanhira wrote: Tue 20 Jul 2021 11:26 It's not a bug, this is a intended behavior.
^ and $ are just anchors that are used to bind the search to the position of the searched text, but it's pointless to search for them separately without the text
I do not agree
Regular Expressions are present in many applications.
For examples in Notepad ++ there is the "search and replace" function that use same symbols ^ and also $ but you don't need to add any characters after that symbols to work!

Also this website use the symbol ^
https://coding.tools/regex-replace

Furthermore ...
Why should the two symbols ^ beginning of line and < Beginning of word work differently?

I think that is a bug

dzhanhira
Devart Team
Posts: 239
Joined: Mon 26 Oct 2020 13:49

Re: Find And Replace with Regular Expression is problematic (perhaps there is a bug?)

Post by dzhanhira » Wed 21 Jul 2021 07:29

I will pass your suggestion to our Team, we are going to review this behavior in the future.
You can add this suggestion to our UserVoice: https://devart.uservoice.com/

Post Reply