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

  • Home
  • SEARCH
  • 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 8308399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:48:04+00:00 2026-06-08T18:48:04+00:00

I have been trying to use a regexp that matches any text that is

  • 0

I have been trying to use a regexp that matches any text that is between a caret, less than and a greater than, caret.

So it would look like: ^< THE TEXT I WANT SELECTED >^

I have tried something like this, but it isn’t working: ^<(.*?)>^

I’m assuming this is possible, right? I think the reason I have been having such a tough time is because the caret serves as a quantifier. Thanks for any help I get!

Update

Just so everyone knows, they following from am not i am worked

 /\^<(.*?)>\^/

But, it turned out that I was getting html entities since I was getting my string by using the .innerHTML property. In other words,

> ... &gt;
< ... &lt;

To solve this, my regexp actually looks like this:

\^&lt;(.*?)((.|\n)*)&gt;\^

This includes the fact that the string in between should be any character or new line. Thanks!

  • 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-08T18:48:06+00:00Added an answer on June 8, 2026 at 6:48 pm

    You need to escape the ^ symbol since it has special meaning in a JavaScript regex.

     /\^<(.*?)>\^/
    

    In a JavaScript regex, the ^ means beginning of the string, unless the m modifier was used, in which case it means beginning of the line.

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

Sidebar

Related Questions

I have been trying to create a regular expressions pattern that matches any reference
I have been trying to use date_format , however as far as I know,
I have been trying to use array_unique to remove duplicates from the search results
I have been trying to use routes.rb for creating a URL /similar-to-:product (where product
I have been trying to use the hibernate dialect for SQLite from http://code.google.com/p/hibernate-sqlite/ in
I have been trying to use/save the boolean value of a checkbox in other
I have been trying to use 3rd party tool called visiblox for rendering charts
I have been trying to use the document.getElementByID to pull information from an HTML
Right now I have been trying to use Launchpad's API to write a small
Ok I'm stumped. I have been trying to use Simpletip to create a tooltip

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.