user avatar
user avatar
user avatar
Parth Bhatt
  • Member for 10 years, 1 month
  • Last seen more than 1 year ago

I am iPhone and iPad developer. ^[-_,A-Za-z0-9]$

NSRegularExpression *reg = [NSRegularExpression regularExpressionWithPattern:@"(#[a-zA-Z0-9_-]+)" options:NSRegularExpressionCaseInsensitive error:nil];

NSString *stringData = @"This is Parth known as #parth and this is an awesome place. I am fan of #scganguly.";

int count = [reg numberOfMatchesInString:stringData options:0 range:NSMakeRange(0, [stringData length])];


   NSArray *array =  [reg matchesInString:stringData options:0 range:NSMakeRange(0, [stringData length])];
    NSMutableArray *stringArray = [[NSMutableArray alloc] init];
    for (NSTextCheckingResult *result in array) {
        NSString *stringFinal = [stringData substringWithRange:result.range];
        if(stringFinal != nil)
            [stringArray addObject:stringFinal];
    NSLog(@"stringArray: %@",stringArray);

For @user: @"(@[a-zA-Z0-9_]+)"

    NSLog(@"Request String: %@", requestString);

    NSData *requestData = [NSData dataWithBytes: [requestString UTF8String] length: [requestString length]];

    //    NSString *fileLoc = [[NSBundle mainBundle] pathForResource:@"url" ofType:@"plist" ];
    //    NSDictionary *fileContents = [[NSDictionary alloc] initWithContentsOfFile:fileLoc];
    //    NSString *urlLoc = [fileContents objectForKey:@"baseURL"];
    NSString *urlLoc = @"";
    NSLog(@"URL is %@",urlLoc);
    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:
                                    [NSURL URLWithString: urlLoc]];

    NSString *postLength = [NSString stringWithFormat:@"%d", [requestData length]];
    [request setHTTPMethod: @"POST"];
    [request setValue:postLength forHTTPHeaderField:@"Content-Length"];
    [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
    [request setHTTPBody: requestData]; upload audio file to php ios

This user doesn’t have any gold badges yet.
This user doesn’t have any silver badges yet.
bronze badges

This user hasn’t posted yet.