Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search And Replace With Regular Expression webuilder

I want to find and replace this statements in all project files.

Search:

MD.QryLoadSupplycode.Value
MD.QryLoadClientname.Value

Result :

MD.QryLoadSupplycode.AsString
MD.QryLoadClientname.AsString

Please Help!!!!

I have tried do

Search: MD\.[A-Z,a-z,0-9]+\.Value (yes found)
Replace: MD\.[A-Z,a-z,0-9]+\.AsString (not work)
like image 893
user3777474 Avatar asked Dec 14 '25 01:12

user3777474


1 Answers

The main problem is that you're trying to use your pattern in your replacement instead of matching and capturing the pattern when you execute your search.

By placing a capturing group () around your search pattern, we can reference back to what was matched in the replacement call.

Search: (MD\.[a-zA-Z0-9]+\.)Value
Replace: \1AsString

Note: By having commas inside your character class, you're matching literals ( not separating the syntax )

like image 116
hwnd Avatar answered Dec 15 '25 19:12

hwnd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!