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 7779015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T18:32:38+00:00 2026-06-01T18:32:38+00:00

The not followed by operator is as follows: ( per quick reference at http://regexpal.com/

  • 0

The “not followed by” operator is as follows: ( per quick reference at http://regexpal.com/ )

?!exprssion

Can I chain these together like this?

?!(?!exprssion)

Why do I ask you ask?

because I need to split() on

|

or

| not follwed by |*

but

| followed by |** is O.K.

See how that is complicated?

Broken Try

.split( /\|\*\*|\|(?!\*)/ );

This does not work because it splits on

|**

and I need my split on

|
  • 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-01T18:32:39+00:00Added an answer on June 1, 2026 at 6:32 pm

    Split on this:

    \|(?!\*)|\|\*\*
    

    This says: either a pipe followed by something not a star (which we will not use to split on), or a pipe followed by 2 stars (use the whole thing to split). I’m not certain from your wording if that’s what you’re looking for. If you mean “split on pipe, unless it’s followed by a single star, but split on a pipe following by 2 stars” then use this:

    \|(?!\*[^*])
    

    Demo: http://codepad.org/Gt0xNQNO

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

Sidebar

Related Questions

I want to find all if statements and for statements which are not followed
I want to replace char '&' if it's not followed by '#'. For example
Not really getting the point of the map function. Can anyone explain with examples
Not sure how to ask a followup on SO, but this is in reference
How would I make a regular expression to match the character < not followed
How can specify expression in LIKE operator I want to select all row in
Based on this A positional argument is a name that is not followed by
As written, getint treats a + or - not followed by a digit as
I need javascript regex that will match words that are NOT followed by space
I have to replace \ in files when the \ is not followed by

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.