Skip to main content
deleted 28 characters in body
Source Link
Chris Summers
  • 9.1k
  • 1
  • 22
  • 55

Jamie has included some great suggestions. All of which I recommend over this one, but most people don't realize that there is limited string manipiulation possible using JScript functions (i.e. substring and indexOf) within DWT TBBs. So this is possible:

@@"chris@urbancherry@@"chris@blah.net".substring(0,("chris@urbancherry"chris@blah.net").indexOf("@"))@@<br/>
@@"chris@urbancherry@@"chris@blah.net".substring(("chris@urbancherry"chris@blah.net").indexOf("@"))@@

Of course you can use a field value instead of the whole string, but this shows the point. I think this is pretty ugly, and would really suggest creating a Function Source, but in a pinch, this would work for you.

Jamie has included some great suggestions. All of which I recommend over this one, but most people don't realize that there is limited string manipiulation possible using JScript functions (i.e. substring and indexOf) within DWT TBBs. So this is possible:

@@"chris@urbancherry.net".substring(0,("chris@urbancherry.net").indexOf("@"))@@<br/>
@@"chris@urbancherry.net".substring(("chris@urbancherry.net").indexOf("@"))@@

Of course you can use a field value instead of the whole string, but this shows the point. I think this is pretty ugly, and would really suggest creating a Function Source, but in a pinch, this would work for you.

Jamie has included some great suggestions. All of which I recommend over this one, but most people don't realize that there is limited string manipiulation possible using JScript functions (i.e. substring and indexOf) within DWT TBBs. So this is possible:

@@"chris@blah.net".substring(0,("chris@blah.net").indexOf("@"))@@<br/>
@@"chris@blah.net".substring(("chris@blah.net").indexOf("@"))@@

Of course you can use a field value instead of the whole string, but this shows the point. I think this is pretty ugly, and would really suggest creating a Function Source, but in a pinch, this would work for you.

Source Link
Chris Summers
  • 9.1k
  • 1
  • 22
  • 55

Jamie has included some great suggestions. All of which I recommend over this one, but most people don't realize that there is limited string manipiulation possible using JScript functions (i.e. substring and indexOf) within DWT TBBs. So this is possible:

@@"[email protected]".substring(0,("[email protected]").indexOf("@"))@@<br/>
@@"[email protected]".substring(("[email protected]").indexOf("@"))@@

Of course you can use a field value instead of the whole string, but this shows the point. I think this is pretty ugly, and would really suggest creating a Function Source, but in a pinch, this would work for you.