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?
Who is Participating?
_agx_Connect With a Mentor Commented:
Ok. Just add a "-" before the "<br>"

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

<cfset unitName = "ADM-OPS-ITS-IS-AED">
#listChangeDelims(unitName, "<br>", "-")#
traportAuthor Commented:
That is almost what I want. I don't want to lose the -, I just want to <br> after it. Thank you!
traportAuthor Commented:
Thank you!
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.