replace text with text from same document

Tool for Search and Replace across multiple files.
Post Reply
User avatar
Luke

replace text with text from same document

Post by Luke »

I need to do the following and don't know where to start. I hope someone can help me. I need to replace the * in the following text with the text that comes after the word prop in line six.


{
User avatar
my post

Post by my post »

It seems the forum won't let me post the text I need to. Anyway I can get an email address or get the text posted somewhere so I can get help? Thanks
User avatar
DV

Post by DV »

If you send the text to software AT digitalvolcano.co.uk I'll try and post it.

User avatar
Luke

Post by Luke »

I sent it and I hope someone can help me.

Thanks
User avatar
DV

Post by DV »

Thanks - will have a look
User avatar
DV

Post by DV »

L1: {
L2: version
L3: {
L4: number 6
L5: }
L6: prop ADS_cannon
L7: {
L8: storageOffset 0 0 0
L9: objFileGeom 0 0 :Runtime:Geometries:ADS_Pirate_Props: .obj
User avatar
DV

Post by DV »

RegEx - (prop )(.*)([\s,\S]*)(.obj)
Replace - $1$2$3$2$4

This will take the prop value (ads_cannon) and put it at the end. Minor problem with it adding a newline before the final .obj though
User avatar
Luke

Post by Luke »

Thanks! I got your email too. I will try this and let you know what happens.
User avatar
Luke

Post by Luke »

This works great. It would be perfect if I could get rid of that hard return so the file extension .OBJ would be intact with the filename.

Thanks again!
Post Reply