SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 6.4.199 preview] Code search&replace

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 6.4.199 preview] Code search&replace
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post [SA 6.4.199 preview] Code search&replace Reply with quote
How do I use a grouped regular expression? What is the syntax for backreference? Also, what does the option Protect object names do?
Tue May 28, 2013 9:07 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7854

Post Reply with quote
You should be able to use standard syntax for regular expressions. I'm not sure what you mean by grouped. Could you please provide more details.

The Protect option will spare names in ALTER PROCEDURE [name] code, and will replace in the bodies only. This applies to views and functions too.
Tue May 28, 2013 1:57 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
SysOp wrote:
YouThe Protect option will spare names in ALTER PROCEDURE [name] code, and will replace in the bodies only. This applies to views and functions too.

That makes sense, thanks.

SysOp wrote:
You should be able to use standard syntax for regular expressions. I'm not sure what you mean by grouped. Could you please provide more details.

Sure. I wanted to replace "([\s='])dbname_to_replace" with "\1new_db_name". The search part was processed properly but the replace part was inserted literally: "\1" was not replaced with the captured group. I tried "$1" as well, alas, to no avail.
Tue May 28, 2013 5:25 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7854

Post Reply with quote
Oh, I see. I'm sorry, but the regular expressions are only used for the text matching for the search operations. Presently, only a static string can be used as a replacement.
Tue May 28, 2013 11:36 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
But you plan to extend that to fully support regular expressions, both in search and replace parts, don't you?
Wed May 29, 2013 4:50 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.