| View previous topic :: View next topic |
| Author |
Message |
Silver Surfer
Joined: 13 Jan 2012 Posts: 20
|
Posted: Fri Jan 13, 2012 3:25 am Post subject: How to trigger mud output's "tab character" in sub |
|
|
Hello
I have such a problem.
My mud outputs me a string, beginning with the "tab character", and continuing with consequent characters "Str" (and further nonspecial characters): so this mud's output string is like:
" Str..."
I enabled "con {convert meta} {on}". It shows me that string as
"\C-iStr..."
(where "\C-i", as I guess, is "tab character").
I need to write substitute triggering this string (which replaces it to something new). Please help me how to write substitute that will trigger that string (by now, no luck... ) |
|
| Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3274
|
Posted: Fri Jan 13, 2012 9:21 pm Post subject: |
|
|
Looks like you're running an old tt++ version.
In the current version it should show \t for tabs, and you can use \t in your subs and actions to trigger tabs. |
|
| Back to top |
|
 |
Silver Surfer
Joined: 13 Jan 2012 Posts: 20
|
Posted: Sat Jan 14, 2012 6:35 am Post subject: |
|
|
Then, in new version, I do this like following?:
#sub {^\tStr...} {newtext}
?
--------------------------------------
One new question.
What is the correct format for checking by regexp if the string is empty.
Please, give an example. |
|
| Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3274
|
Posted: Sat Jan 14, 2012 10:45 am Post subject: |
|
|
Yes.
To check for an emptry string use something like #gag {^$} |
|
| Back to top |
|
 |
|