You have to login in order to post a reply to this topic.

5 replies [Last post]
peter-
peter-'s picture
User offline. Last seen 5 hours 21 min ago. Offline
Joined: 11/20/2009
Posts: 54

Could we have a option to leave only a single space between words?

__________________

ourarticles

__________________

ourarticles

D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: On the trim text action

 There is a very easy regular expression that allows you to do that. All you have to do is use the "Replace Text" action with the following options:

- "Text To Parse": The variable that contains the text that you want to fix.
- "Text To Find": (\s)+
- "Replace With": $1
- "Use Regular Expressions for find and replace": Checked

The output variable (default %Replaced%) will contain the text with a single space replacing all series of space keystrokes.

__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==

peter-
peter-'s picture
User offline. Last seen 5 hours 21 min ago. Offline
Joined: 11/20/2009
Posts: 54
Re: On the trim text action

Thank you this will be most useful

__________________

ourarticles

__________________

ourarticles

zeallous
zeallous's picture
User offline. Last seen 1 year 32 weeks ago. Offline
Joined: 06/28/2010
Posts: 1
Re: On the trim text action

 
I have this problem right now. for e.g.
 
BAS .DE TSD.DE 
C TEE .DE
 
I want to make it to because
 
BAS.DE,TSD.DE,C,TEE.DE
 
I tried using replace text. however it doesn't allow me to replace a "space"
 
in notepad, if i do the following
1. replace <space>. with .
2. replace <space> with ,
 
it will become the results as shown.
 
How to get the results from your software (instead of directing it to notepad)

__________________

az

__________________

az

D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: On the trim text action

 In WinAutomation <space> can be represented with %" "%. I think there is a knowledge base article somewhere about how you can use space and blank in WinAutomation

__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==

kimc
kimc's picture
User offline. Last seen 7 hours 33 min ago. Offline
Joined: 01/13/2011
Posts: 167
Re: On the trim text action

Also (from the KB article) an empty string can be representing by %""%.

__________________

Kim C.

Virginia, USA

__________________

Kim C.

Virginia, USA