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])];
NSLog(@"%d",count);
if(count>0)
{
NSArray *array = [reg matchesInString:stringData options:0 range:NSMakeRange(0, [stringData length])];
NSLog(@"%@",array);
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 = @"http://portal.abc.com/candidate/post-info";
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];
Area 51
Stack Exchange Network staging zone, where users come together to build new Q&A sites
Joined 2 years ago, last seen 2 years ago
151 reputation
1
badges
- questions
- answers
Meta Stack Overflow
Q&A for meta-discussion of the Stack Exchange family of Q&A websites
Joined 2 years ago, last seen 4 months ago
128 reputation
4
badges
1 questions
0 answers
Programmers
Q&A for professional programmers interested in conceptual questions about software development
Joined 1 year ago, last seen 4 months ago
121 reputation
2
badges
0 questions
1 answers
Personal Productivity
Q&A for people wanting to improve their personal productivity
Joined 1 year ago, last seen 5 months ago
121 reputation
3
badges
0 questions
2 answers
Ask Different
Q&A for power users of Apple hardware and software
Joined 2 years ago, last seen 6 months ago
105 reputation
4
badges
2 questions
0 answers
Photography
Q&A for professional, enthusiast and amateur photographers
Joined 1 year ago, last seen 1 year ago
101 reputation
1
badges
0 questions
0 answers
Server Fault
Q&A for professional system and network administrators
Joined 2 years ago, last seen 2 years ago
101 reputation
1
badges
0 questions
0 answers