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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:56:50+00:00 2026-06-16T17:56:50+00:00

I have been facing issues with using regex with sed. I have a string

  • 0

I have been facing issues with using regex with sed.
I have a string like :

Call stack: [thread 0xac0aaa28]: | start | main main.m:37 | UIApplicationMain | GSEventRun | GSEventRunModal | CFRunLoopRunInMode | CFRunLoopRunSpecific | __CFRunLoopRun | __CFRunLoopDoSource1 | __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ | mshMIGPerform | _XCopyAttributeValue | _AXXMIGCopyAttributeValue | _copyAttributeValueCallback | -[NSObject(AXPrivCategory) accessibilityAttributeValue:] | -[UITableViewCellAccessibilityElement _accessibilityIsTableCell] | -[UITableViewCellAccessibilityElement tableViewCell] | -[UITableViewAccessibility(Accessibility) accessibilityCellForRowAtIndexPath:] | -[UITableView(UITableViewInternal) _createPreparedCellForRowAtIndexPath:] | -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] | -[MailViewController tableView:cellForRowAtIndexPath:] | +[NICellFactory tableViewModel:cellForTableView:atIndexPath:withObject:] NICellFactory.m:89 | +[NICellFactory cellWithClass:tableView:object:] NICellFactory.m:67 | -[SwipableTableViewCell shouldUpdateCellWithObject:] | -[SwipableTableViewCell updateCellWithObject:] | -[ThreadCellFrontView updateCellWithObject:] | -[ThreadSummaryView updateWithNugget:] | -[JavaUtilLinkedList init] LinkedList.m:49 | -[JavaUtilLinkedList initJavaUtilLinkedList] LinkedList.m:40 | +[NSObject alloc] | +[NSObject allocWithZone:] | _objc_rootAllocWithZone | class_createInstance | calloc | malloc_zone_calloc

which has instances like main.m:37 |, LinkedList.m:95 |, NICellFactory.mm:89 | etc
i.e in text mate I can match these occurences with using the regex

[a-zA-z]+[.][m]+[:]+[0-9]+[ |]+

Now when I try to do the same thing in sed using

sed 's/\[a-zA-z]+[.][m]+[:]+[0-9][ |]+/ /g'

Sed does not seem to replace these instances.
I have tried using backlashes too
i.e

sed 's/\[a-zA-z\]+\[\.\]\[m\]+\[:\]+\[0-9\]+\[ |\]+/ /g'

Still sed does not replace such occurences.

Can someone help me understand what am I doing wrong?

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-16T17:56:50+00:00Added an answer on June 16, 2026 at 5:56 pm

    The backslashes you added for no good reason are the problem. Also your sed dialect may not support + repetition out of the box – try with * instead, or look for a -r or -E option in your sed manual page.

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

Sidebar

Related Questions

I have been facing issue with sphinx result set for string attribute. Below is
I have been facing some serious issues while executing this particular JSP page. CODE
We have been facing Out of Memory errors in our App server for sometime.
Hell All, So I have been facing this behavior for quite some time and
Have been trying to encrypt an xml file to a string so that I
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
Have been searching how to convert a dictionary to a string. But the results
I have been tracking emails for years using a "beacon" image and for those
recently I've been playing with DCG in Prolog but I've been facing some issues
I have been testing background subtraction using gaussian state model. I am using opencv

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.