Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8354079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:26:51+00:00 2026-06-09T09:26:51+00:00

I have been messing with this for while now and I hope you guys

  • 0

I have been messing with this for while now and I hope you guys can help.
So I have a XSL variable like

<xsl:variable name="blah" select="'texttexttext texttexttexttext Note:texttexttexttext'" />

What I’m trying to do is first search for “Note:” in $blah. If it is found, add a line break before it like &#xD; . So the output will be like

blah-> "'texttexttext texttexttexttext &#xD;Note:texttexttexttext'"

I’m able to search for the term using the usual contains function like:

<xsl:if test="(contains($blah,'Note:'))">true</xsl:if>

but I’m confused on getting replace/insert of line break

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T09:26:52+00:00Added an answer on June 9, 2026 at 9:26 am

    XSLT 2.0 comes with some nice regex functions.

    By using the replace function as here :

    replace($blah, "(.*)(Note:.*)", "$1&amp;#xD;$2")
    

    You shall get the desired result. So basically, I am catching all before and after Note: and I am just putting your line-break in between at the result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been messing around with this for a while now but I can't seem
I have been trying to wrap my head around this for a while now
I have been messing with the facebook API/SDK for a while now as I
Ok well I have been fighting with this for a while now and have
Hey I have been battling with this problem for a while now. Perhaps there
I have been trying to get this code to work for a while now
I have been building this app for a while now and have not had
I've been using VIM for a few weeks now while messing with various web
I've been struggling for this for a while now. I'm trying to gear up
I've been messing around a bit with a Facebook application for a while now,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.