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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:22:21+00:00 2026-05-27T13:22:21+00:00

I need to parse my string but my delimiters are all characters excepts a-z

  • 0

I need to parse my string but my delimiters are all characters excepts a-z and A-Z.
How can I do that?

I thought strtok but I must write all character as delimiter and it would be too long.
Exampe string:

Ax'cda2hsa+AsF(f/a as

It needs to be split into: “Ax” “cda” “hsa” “AsF” “f” “a” “as”

Is there any parsing function in C libraries which i can write my all delimeters as an interval ?

  • 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-27T13:22:22+00:00Added an answer on May 27, 2026 at 1:22 pm

    you can just walk thru the string and do that yourself if you don’t want to do regex(3)

    #include <stdio.h>
    #include <string.h>
    
    int main(int ac, char *av[]) {
        char string[] = "   Ax'cda2hsa+AsF(f/a as";
        int i,idx,len;
        len = strlen(string);
        #define MAX_SPLIT 256
        #define MAX_SPLIT_MASK (MAX_SPLIT - 1)
        char buf[MAX_SPLIT];
        for (idx = 0, i=0;i<len;i++) {
            char c = string[i];
            if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <='Z')) {
                buf[idx++ & MAX_SPLIT_MASK] = c;
            } else {
                buf[idx++ & MAX_SPLIT_MASK] = '\0';
                if (idx > 1)
                    printf("%s\n",buf);
                idx = 0;
            }
        }
        if (idx > 1) {
                buf[idx++ & MAX_SPLIT_MASK] = '\0';
                printf("%s\n",buf);
        }
        #undef MAX_SPLIT
        #undef MAX_SPLIT_MASK
    
        return 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a solution that can parse a date string but replaced with a
Sometimes I need to parse string that is CSV, but I am having trouble
I have some sort of recursive function, but I need to parse a string,
I need to parse out the string that has following structure x:{a,b,c,}, y:{d,e,f} etc.
I have a string like this that I need to parse into a 2D
I need a PHP Regex that can parse .strings files. In particular, it needs
I need to parse a String that does not originally have the year set
I need to parse the below string, and want to use regular expression but
I need to parse a string so the result should output like that: abc,def,ghi,klm,nop
I need to parse an extremely complex string of characters to extract a particular

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.