How to break up a ColdFusion Variable on a '-' sign.

I have variables that contain '-'. Example, the variable #unitName# is ADM-OPS-ITS-IS-AED. I want to force a line break after the hyphens... How would I do this?
traportAsked:
Who is Participating?
 
_agx_Connect With a Mentor Commented:
Ok. Just add a "-" before the "<br>"

#listChangeDelims(unitName, "-<br>", "-")#
0
 
_agx_Commented:
Try listChangeDelims

<cfset unitName = "ADM-OPS-ITS-IS-AED">
<cfoutput>
#listChangeDelims(unitName, "<br>", "-")#
</cfoutput>
0
 
traportAuthor Commented:
That is almost what I want. I don't want to lose the -, I just want to <br> after it. Thank you!
0
 
traportAuthor Commented:
Thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.