Hi Wouter and Trevor
Thanks for the replies. Yes Trevor, I had a similar line of code and I
couldn't work out why it didn't strip the RHS whitespace. Anyway I was
using RegEx because I thought it would be faster, but how elegant is:
get word 1 to -1 of pString
... thanks so much Wouter!
Trevor
Hi Wouter
On Apr 14, 2005, at 3:52 AM, Wouter wrote:
On 14 Apr 2005, at 01:49, Ken Ray wrote:
On 4/13/05 2:47 PM, "Trevor DeVore" <[EMAIL PROTECTED]> wrote:
get matchText(pString, "(?s)^[ \t\r\n]+(.*?)[ \t\r\n]+$", tReturnVal)
Wow, lots of things happen when sleeping :-).
The matchtext version is
Thanks Eric
Regards,
Wouter
On 14 Apr 2005, at 10:54, Eric Chatonet wrote:
Hi Wouter,
Le 14 avr. 05, à 10:52, Wouter a écrit :
The hard space if any, can be dealt with in a one time replacement by
a soft space in the container to parse, out of the repeat loop.
(is the non breaking space numtochar
Hi Wouter,
Le 14 avr. 05, à 10:52, Wouter a écrit :
The hard space if any, can be dealt with in a one time replacement by
a soft space in the container to parse, out of the repeat loop.
(is the non breaking space numtochar(16)? On the mac this is mostly
represented by a non-space character for
On 14 Apr 2005, at 01:49, Ken Ray wrote:
On 4/13/05 2:47 PM, "Trevor DeVore" <[EMAIL PROTECTED]> wrote:
get matchText(pString, "(?s)^[ \t\r\n]+(.*?)[ \t\r\n]+$", tReturnVal)
This will strip leading and trailing whitespace from a multiline
string. But given that you say that word 1 to -1 is that mu
On 4/13/05 7:22 PM, "Trevor DeVore" <[EMAIL PROTECTED]> wrote:
> On Apr 13, 2005, at 4:49 PM, Ken Ray wrote:
>> get matchText(pWhat, "(?s)^\s+(.*?)\s+$", tReturnVal)
>>
>> I agree that the "word 1 to -1" solution will do what you want 95+% of
>> the
>> time, but just wanted to make sure that ev
On Apr 13, 2005, at 4:49 PM, Ken Ray wrote:
get matchText(pWhat, "(?s)^\s+(.*?)\s+$", tReturnVal)
I agree that the "word 1 to -1" solution will do what you want 95+% of
the
time, but just wanted to make sure that everyone knew there was at
least one
'hole' in that approach in case anyone cared.
On 4/13/05 2:47 PM, "Trevor DeVore" <[EMAIL PROTECTED]> wrote:
> get matchText(pString, "(?s)^[ \t\r\n]+(.*?)[ \t\r\n]+$", tReturnVal)
>
> This will strip leading and trailing whitespace from a multiline
> string. But given that you say that word 1 to -1 is that much faster I
> am going to switc
Trevor DeVore wrote:
This will strip leading and trailing whitespace from a multiline
string. But given that you say that word 1 to -1 is that much faster
I am going to switch to that. Those of us still trying to break away
from our previous languages like to complicate things on occasion ;)
On 4/13/05 5:14 AM, Matt Denton wrote:
I want a single RegEx expression using ReplaceText to strip out leading
and tailing spaces, leaving any spaces in the middle untouched.
For this particular case where you don't want to remove internal
spacing, I like to use regular transcript:
get word 1 t
On 13 Apr 2005, at 21:47, Trevor DeVore wrote:
snip
Is there a way to do ltrim (trim whitespace on left of string) in
plain transcript? Right now I just use:
function str_lTrim pString
get replaceText(pString, "^[ \t\r\n]+", "")
return it
end str_lTrim
--
Trevor DeVore
Blue Mang
On Apr 13, 2005, at 12:25 PM, Wouter wrote:
On 13 Apr 2005, at 18:09, Trevor DeVore wrote:
I use this regex to strip whitespace:
get replaceText(pString, "^[ \t\r\n]+|[ \t\r\n]+$", "")
No offence, but this won't strip whitespaces at both ends of a string
in one pass.
And it is about ten times slo
On 13 Apr 2005, at 18:09, Trevor DeVore wrote:
On Apr 13, 2005, at 3:14 AM, Matt Denton wrote:
G'day all
Regular Expression syntax in ReplaceText is driving me a bit loopy
right now, I was hoping someone out there could work out what I'm
doing wrong...
I want a single RegEx expression using Repl
On Apr 13, 2005, at 3:14 AM, Matt Denton wrote:
G'day all
Regular Expression syntax in ReplaceText is driving me a bit loopy
right now, I was hoping someone out there could work out what I'm
doing wrong...
I want a single RegEx expression using ReplaceText to strip out
leading and tailing space
And what about a one line non regex solution like: put word 1 to -1 of
x into x?
(I know, not as elegant and impressive as a true regex ;-)
Gr W.
On 13 Apr 2005, at 12:14, Matt Denton wrote:
G'day all
Regular Expression syntax in ReplaceText is driving me a bit loopy
right now, I was hoping some
G'day all
Regular Expression syntax in ReplaceText is driving me a bit loopy
right now, I was hoping someone out there could work out what I'm doing
wrong...
I want a single RegEx expression using ReplaceText to strip out leading
and tailing spaces, leaving any spaces in the middle untouched.
16 matches
Mail list logo