Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Wed Feb 10, 2010 3:44 am   

Stripping <CR><LF> from mxp data
 
Is there any way to do the above, taking <CR><LF> out of a mud-formatted paragraph?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Feb 10, 2010 5:32 am   
 
Did you try the %replace() function? Not sure it'd work, but it'd go something like this:

%replace(source string,%cr,"")

You are probably better off revealing what you're actually trying to do, though, as there's probably a better way.
_________________
EDIT: I didn't like my old signature
Reply with quote
Dumas
Enchanter


Joined: 11 Feb 2003
Posts: 511
Location: USA

PostPosted: Wed Feb 10, 2010 12:56 pm   
 
What my trigger (to capture a room desc) is capturing (from debugger)
Code:
Protruding out of <CR><LF>
the mountainside, overlooking the highlands below, this precipice offers a good <CR><LF>
view of the entire area below it. The horizon linking up to the Grey Towers far <CR><LF>
to the west, all the major landmarks of the Highlands are easily visible. The <CR><LF>
wind continually buffets the precipice, tugging and blowing anything on the <CR><LF>
surface.<ESC>[30m<ESC>[37m<ESC>[4z


What I get when I look at this in the mapper description box
Code:
Protruding out of
the mountainside, overlooking the highlands below, this precipice offers a good
view of the entire area below it. The horizon linking up to the Grey Towers far
to the west, all the major landmarks of the Highlands are easily visible. The
wind continually buffets the precipice, tugging and blowing anything on the
surface.


The mapper is maintaining the <CR><LF> structure. I want it to perform its own wrapping, rather than be subjected to this, especially the first line :)
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Wed Feb 10, 2010 3:10 pm   
 
A subregex comes to mind. As the first pattern use "\n" or "\r" and substitute in "" for those.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Feb 11, 2010 12:28 am   
 
Another thing to check is whether your mud has a setting to turn off internal line wrapping. Many muds do.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net