I have a text of the form

1;#aa2;#dde4;#sdfsa6;#hjjs

I want to remove digit and ;# from the above string and keep the string as

aa
dde
sdfsa
hjjs

Is there a way like we do in C# to check if string contains <digit>;# and replace it with a
or a blank space.

I was trying to split on ;# as

=(Split(Fields!ows_Room.Value,";#")).GetValue(1)

but than the output is only aa2.

有帮助吗?

解决方案 2

Give a try to following expression.

    =Join(Split((System.Text.RegularExpressions.Regex.Replace(Fields!ows_Room.Value, "[0-9]", "").Trim(";").Trim("#")),";#"),” “)

其他提示

You are getting aa2 only because GetValue(1) retruns the first indexed array value. Change you expression to

    = Join(Split(Fields!ows_Room.Value,";#"),” “)

If you want the output like

aa2
dde4
sdfsa6
hjjs

use this expression

    = Join(Split(Fields!ows_Room.Value,";#"),VBCRLF)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top