Page 1 of 1

Character after "-" should be Capital letter

Posted: Mon May 03, 2010 3:36 am
by pavankatra
Hi,
my requirement is like

Character after "-" should be Capital letter

Ex:

input:
hi this - is dsxchange forum.
output:
hi this - Is dsxchange forum.
Can anyone please suggest me how to accomplish this.

Thanks In advance.

Thanks

Posted: Mon May 03, 2010 4:25 am
by ray.wurlod
Noting that you may need to modify the expression because of the space following the "-" character one solution is

Code: Select all

If Index(InLink.TheString, "-", 1) > 0 Then Field(InLink.TheString, "-", 1, 1) : "-" : UpCase(Left(Field(InLink.TheString, "-", 2, 1))) : Right(Field(InLink.TheString,"-",2,1),Len(Field(InLink.TheString, "-", 2, 1) -1) Else InLink.TheString
You could (should) extract the common subexpression into a stage variable.

Posted: Mon May 03, 2010 4:35 am
by pavankatra
ray.wurlod wrote:Noting that you may need to modify the expression because of the space following the "-" character one solution is

Code: Select all

If Index(InLink.TheString, "-", 1) > 0 Then Field(InLi ...[/quote]

Hi Ray,

Thanks for your reply

 i am not premium user.If you dontmind can you please elaborate that.And one more thing i need to do capital letter after hiphen(-).

Thanks in advace

Posted: Mon May 03, 2010 8:40 am
by battaliou
Ha ha ha. Thats excellent.

Posted: Mon May 03, 2010 4:47 pm
by ray.wurlod
A simple remedy for your dilemma exists here.

I posted a full answer.