Page 1 of 1

replace text with text from same document

Posted: Thu Feb 12, 2009 7:38 am
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.


{

Posted: Thu Feb 12, 2009 7:42 am
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

Posted: Thu Feb 12, 2009 9:50 am
by DV
If you send the text to software AT digitalvolcano.co.uk I'll try and post it.


Posted: Sun Apr 05, 2009 3:27 am
by Luke
I sent it and I hope someone can help me.

Thanks

Posted: Sun Apr 05, 2009 8:48 pm
by DV
Thanks - will have a look

Posted: Sun Apr 26, 2009 2:32 pm
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

Posted: Sun Apr 26, 2009 2:53 pm
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

Posted: Sun Apr 26, 2009 8:46 pm
by Luke
Thanks! I got your email too. I will try this and let you know what happens.

Posted: Fri May 01, 2009 10:30 pm
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!