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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T23:24:00+00:00 2026-05-21T23:24:00+00:00

I tried (\s|\t).*[\b\w*\s\b] , this one is almost ok but I want also except

  • 0

I tried (\s|\t).*[\b\w*\s\b], this one is almost ok but I want also except lines with #.

#Name                       Type       Allowable values                        
#========================== =========  ========================================
_absolute-path-base-uri     String     -                                       
add-xml-decl                Boolean    y/n, yes/no, t/f, true/false, 1/0       
  • 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-05-21T23:24:01+00:00Added an answer on May 21, 2026 at 11:24 pm

    As @anubhava said in his answer, it looks you just need to check for # at the beginning of the line. The regex for that is simple, but the mechanics of applying the regex varies wildly, so it would help if we knew which regex flavor/tool you’re using (e.g. PHP, .NET, Notepad++, EditPad Pro, etc.). Here’s a JavaScript version:

    /^[^#].*$/mg
    

    Notice the modifiers: m (“multiline”) allows ^ and $ to match at line boundaries, and g (“global”) allows you to find all the matches, not just the first one.

    Now let’s look at your regex. [\b\w*\s\b] is a character class that matches a word character (\w), a whitespace character (\s), an asterisk (*), or a backspace (\b). In other words, both * and \b lose their special meanings when the appear in a character class.

    \s matches any whitespace character including \t, so (\s|\t) is needlessly redundant, and may not be needed at all. What it’s actually doing in your case is matching the newline before each matched line. There’s no need for that when you can use ^ in multiline mode. If you want to allow for horizontal whitespace (i.e., spaces and tabs) before the #, you can do this:

    /^(?![ \t]*#).*$/mg
    

    (?![ \t]*#) is a negative lookahead; it means “from this position, it is impossible to match zero or more tabs or spaces followed by #“. Coming right after the ^ line anchor as it does, “this position” means the beginning of a line.

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

Sidebar

Related Questions

I tried everything to debug this one but I can't get to the bottom
I'm sure this one is easy but I've tried a ton of variations and
I am stumped by this one. I have tried several angles and some come
How to chose only one picture which can't repeat? I tried this: I use
In this C code i have tried to assign pointer addresses of one variable
Tried this: scala> 2.isInstanceOf[AnyVal] <console>:8: error: type AnyVal cannot be used in a type
I am really stuck on this one. Website is almost finished. Just trying to
I want to delete all posts in a table except the one where big_image
Tried this: $('.link').click(function(e) { $.getScript('http://www.google.com/uds/api?file=uds.js&amp;v=1.0', function() { $('body').append('<p>GOOGLE API (UDS) is loaded</p>'); }); return
I tried this with MySQL Server 5.5: 1) ensured that transaction isolation level is

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.