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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T12:22:45+00:00 2026-06-14T12:22:45+00:00

I would like to match any character and any whitespace except comma with regex.

  • 0

I would like to match any character and any whitespace except comma with regex. Only matching any character except comma gives me:

[^,]*

but I also want to match any whitespace characters, tabs, space, newline, etc. anywhere in the string.

EDIT:

This is using sed in vim via :%s/foo/bar/gc.

I want to find starting from func up until the comma, in the following example:

func("bla bla bla"
  "asdfasdfasdfasdfasdfasdf"
"asdfasdfasdf", "more strings")

I

  • 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-14T12:22:46+00:00Added an answer on June 14, 2026 at 12:22 pm

    To work with multiline in SED using RegEx, you should look at here.

    EDIT:

    In SED command, working with NewLine is a bit different. SED command support three patterns to manage multiline operations N, P and D. To see how it works see this(Working with Multiple Lines) explaination. Here these three operations discussed.

    My guess is that N operator is the area of consideration that is missing from here. Addition of N operator will allows to sense \n in string.

    An example from here:

    Occasionally one wishes to use a new line character in a sed script.
    Well, this has some subtle issues here. If one wants to search for a
    new line, one has to use “\n.” Here is an example where you search for
    a phrase, and delete the new line character after that phrase –
    joining two lines together.

    (echo a;echo x;echo y) | sed ‘/x$/ { N s:x\n:x: }’

    which generates

    a xy

    However, if you are inserting a new line, don’t use “\n” – instead
    insert a literal new line character:

    (echo a;echo x;echo y) | sed ‘s:x:X\ :’

    generates

    a X

    y

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

Sidebar

Related Questions

I would like to regex match a sequence of bytes when the string '02
My regex at the minute is like this '/[a-z0-9]{40}/i' Which will match any string
I would like to match a pattern in which two words must be present,
I would like to match the numbers inside an HTML tag such as: Sometext<sometag><htmltag>123123</htmltag></sometag>
I would like to match positive and negative numbers (no decimal or thousand separators)
I have a route like following, ideally I would like it to match: domain.com/layout/1-slug-is-the-name-of-the-page
I would like to know how can I create a regexp to match the
I would like 'about' to route to 'abouts/1' I tried this: match 'about' =>
I would like to build an excel VBA program to find all the match
I would like to find all comment blocks(/*...*/) but the function g_regex_match_full always returns

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.