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 .

722 questions
-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
  • 624
  • 3
  • 10
  • 20
-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
  • 667
  • 1
  • 8
  • 23
-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,065
  • 1
  • 13
  • 28
-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
  • 14,306
  • 23
  • 105
  • 189
-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
  • 14,306
  • 23
  • 105
  • 189
-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,473
  • 4
  • 29
  • 68
-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
  • 554
  • 7
  • 10
-2
votes
1 answer

htaccess remove some characters from url and redirect 301

I have migrate from old website to the new one and want to redirect 301 some URLs. Can any one help? I want to redirect 301 mywebsite.com/weblog/post1/amp to …
Sarah
  • 69
  • 1
  • 9
-2
votes
1 answer

What ( ? = ) in the expression?

I'm looking at the following regular expression and wondering if it is: testing for last of input? testing for something else? (? =. *\d)
-2
votes
1 answer

split columns one by one and assign parts of it like label in r

I hope you are well. Look fellows R lovers, I have a tibble data frame and looks like that. (I have 47 columns) v1 v2 v3 v4 01. yes 01. I agree 01. I agree 01. I agree 01. yes 02. Strong agree 02.No Agree 02. Strong Agree 02. no 03.…
Marcelo
  • 45
  • 4
-2
votes
1 answer

How do I output files for post_id?

How do I output files 69_0.jpg , 69_1.jpg, 69_2.jpg for post_id? #folder photo: 69_0.jpg, 69_1.jpg, 69_2.jpg, 970.jpg def jpg(): post_id = 69 text = "Hello World" pics = glob.glob(f'photo//*.jpg') mylist = [] …
-2
votes
1 answer

REGULAR EXPRESSIONS

I have a simple data frame: test = { "City": ['A'], "Features":[ "Street20 - Statue of liberty\n-Avenue40 - Manhattan\n-street40 - Opera320"]} I am using regular expressions to pull out certain information to be shown as follows: Land_marks Statue…
-2
votes
2 answers

How can I use regular expressions to find a word and copy it to a specific location?

Can you please tell me how I can use regular expressions to find what is written between the tags, copy it and paste it between the tags? I've been racking my brains for an hour, I can't find the formula)) Example: Мужские…
user13371545
-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…