Questions tagged [nsregularexpression]

The NSRegularExpression class is used to represent and apply regular expressions to Unicode strings. An instance of this class is an immutable representation of a compiled regular expression pattern and various option flags. The pattern syntax currently supported is that specified by ICU. iOS 4.0+ macOS 10.7+

This class in the Apple developer library (Mac OS X, iOS) is used to represent and apply regular expressions to Unicode strings.

NOTE: This tag should be used only for questions specific to the NSRegularExpression class. Questions about regular expressions in general should be tagged .

643 questions
-1
votes
1 answer

Email Regular expression issue while using special characters

I have created the following regular expression for validating my email - (BOOL)isValidEmail { BOOL stricterFilter = YES; NSString *stricterFilterString = @"[A-Z0-9a-z\\._%+-]+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,4}"; NSString *laxString =…
Umair Suraj
  • 478
  • 9
  • 21
-1
votes
2 answers

How to parse out a string in reverse by using sql regular expressions

I need to backtrace a string for a particular value to parse out. Is there any way to get the required output by using regular expressions. ;2N9XsPQQ;PARAMETER_STRING= Required o/p : 2N9XsPQQ Thanks in Advance
Dileep
  • 534
  • 3
  • 9
  • 16
-1
votes
2 answers

iOS Regular Expression to check whether a NSString starts with g

I am new to Regular Expressions and its usage in iOS .I have a scenario where I have to check whether a NSString starts with 'G' this is my function which returns the bool condition . I am passing the data like this [self…
user3115014
  • 607
  • 1
  • 7
  • 21
-1
votes
2 answers

Regular expression in html to extract specific href

I would like to fetch specific data in JSON Data : every links in href in this markup
Vjardel
  • 1,005
  • 1
  • 12
  • 26
-1
votes
2 answers

What are the correct regular expressions for syntax highlighting?

What are the correct regular expressions using NSRegularExpression for syntax highlighting? The following test must be passed: code // comment code /* comment */ code code "string" code code // comment code code /* comment comment */ code code…
Dmitry
  • 13,126
  • 20
  • 95
  • 177
-1
votes
2 answers

What are good regular expressions ONLY for /* ... */ block?

What are good regular expressions using NSRegularExpression for /* ... */ block like that? code /* bla-bla-bla bla-bla-bla // embedded comment */ code
Dmitry
  • 13,126
  • 20
  • 95
  • 177
-1
votes
1 answer

NSRegularExpression: how to match XXX ... YYY?

I have tried [[[NSRegularExpression alloc] initWithPattern:@"XXX(.*)ZZZ" options:0 error:NULL] but it is not working. I want to match any sequences of characters between by two tags XXX and ZZZ.
Colas
  • 3,225
  • 3
  • 25
  • 61
-1
votes
1 answer

Regular expression for currency data recognizing comma and decimals

Need currency post-processor to be used for all currency amounts. The logic for the post-processor should handle the following cases: 14.978.00 -> 14,978.00 14.97800 -> 14,978.00 14,97800 -> 14,978.00 Logic is as follows: If the number is…
-1
votes
3 answers

NSRegularExpression is not correct working

please i need your help. Here i wrote the part of code, and can not find, where is my mistake: NSString *inputString =@"11111111111"; NSError *error = nil; NSRegularExpression *regExpression = [NSRegularExpression…
kokemomuke
  • 440
  • 6
  • 10
-2
votes
0 answers

control input with regular expression matches

I try to control input with .matches the word have to start with capital letter then small letters min 3 and if there is more words, there is a space between the words and should be all in small letters
Marrre
  • 1
-2
votes
1 answer

How to match same length digits in a string using regex

I want to find a text (for example: stack) in a String that contains digits and chars (for example: s123t123a123c123k). The only rule is that between every character of the search key there should be the same amount of digits, so all of this should…
-2
votes
1 answer

why this regular expression match this?

I want to find the part which has a form like ( float), so I use the expression above. But it matchew with 'b' :(0, 2074.5), which is not what i think, because it has colon. To find the part which has only one float, how can i write my regular…
-2
votes
2 answers

Java minus sign and hypen difference in regex

I am checking file names with a regex. File names can be format of customer name - company name I am using this regex: private static final Pattern fileRegex = Pattern.compile("^[a-zA-Z0-9_\\-\\.\\s\\,\\[\\]()\\{\\}]+$"); But hypen sign (minus…
-2
votes
2 answers

Regular expression string matching with string inside parenthesis

I have been facing an issue with regular expression string matching. Here is my string - var String detectionString = Stack Overflow (hello) I tried this regular expression test - \s(detectionString)\b but could succeed to match a string Stack…
Krunal
  • 68,602
  • 40
  • 230
  • 241
1 2 3
42
43