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
1 answer

REGEXEXTRACT to capture group of strings between 2 characters

I have the following working gsheet formula that transposes, split, trims using REGEXEXTRACT which works to capture the first group of strings separated by OR =transpose(split(IFERROR(TRIM(REGEXEXTRACT(A2,"([^\()]+)")))," OR ",FALSE)) Example below…
gridline81
  • 31
  • 6
-1
votes
1 answer

Regular expression doesn't work in Swift, but work in other languages

I know that NSRegularExpression works on Unicode code points and (normal) JavaScript regex works on UTF-16 code units, but I don't know what should I change in my regex. Regex: ]+>([^<]+)<\/text> Works here: regex101 My parsing method: func…
Dewerro
  • 371
  • 3
  • 12
-1
votes
1 answer

Match Text in a group regardless if their place are changed or not RegEx

I have the following log message: request="POST /api/settings/update HTTP/1.1\r\nHost: example.com\r\nConnection: keep-alive\r\nContent-Length: 601\r\nsec-ch-ua: %22 Not A;Brand%22;v=%2299%22, %22Chromium%22;v=%22101%22, %22Google…
-1
votes
1 answer

Regular expression

I have a document, and I need to find all the words(no spaces) borded with '. (e.g. 'apple', 'hello') What would be the regular expression? I've tried ^''$ but it didn't work. If there isn't any solution, it could not be "any word" but also it can…
Andrew
  • 3
  • 1
-1
votes
1 answer

Filter specific records from mysql text query

I have a very long text file which contains mysql data (insert commands with data). I want to extract specific data based on id (specific insert string). here is the example of my data. INSERT INTO tbl_emp_leave_details…
Muhammad Faizan Khan
  • 10,013
  • 18
  • 97
  • 186
-1
votes
1 answer

need to check following string formats are correct or not using regular expression

How can I check following string is in valid format or not? Can someone provide me regular expression to check this. Expect format should be like :: key:valu;key2:value2; Following are some valid and invalid strings I want to check. k1:v1;k2:v2; =>…
-1
votes
1 answer

regular expression xpath to remove a specific node from a body xml

given this body xml: 2 3 4 MG PROVA I would like as a result: 2 3 4…
Matrix87
  • 9
  • 3
-1
votes
1 answer

How to write pattern and regular experssion in angular

Any have idea of writing pattern and regular in angular. I need input text accept value like this "Demo" Demo, "Demo Data"
-1
votes
1 answer

Search by regular pattern in iOS

Trying to search bbcode-style tags with regular expression: For example, I needed [user=1]John Dow[/user] with regular: [[user=[0-9]+].*?[/user]] But couldn't receive needed result.
Viktorianec
  • 361
  • 6
  • 22
-1
votes
1 answer

Regular expression to satisfy 3 out of 4 conditions for password field

I have to create a regular expression for a password field. The below is the criteria for the same: Must be at least ten (10) characters in length Must contain at least three of the following: Upper case letters, lowercase letters, numbers, and…
user473204
  • 29
  • 3
-1
votes
1 answer

How to differentiate between Amazon, Flipkart, Myntra, Paytm URL?

I want to differentiate between different URLs given by the user so that I can pass a particular URL to a particular function. I want to use RegX for this job but I don't know how to do it perfectly. Amazon…
suraj sharma
  • 415
  • 4
  • 14
-1
votes
1 answer

regular expression - find a letter in by a specific template

I need to write a code about DNA. I need to find between a str of multipal letters a seqence of 6 letters that need to be a match to the template. For example: in index 0 it can be the letter A or T, that it, only those letters. What do I use to do…
Lotem
  • 1
-1
votes
3 answers

Regular expression to remove link in String in Swift

I have bunch of strings I receive from service and need to alter the text to extract and remove 3 types of link as mentioned below anchor - [anchor:info]Account Details[/anchor] action - [action:contact]Contact info[/anchor] link-to -…
Kiran Balegar
  • 916
  • 6
  • 16
-1
votes
1 answer

need my string clean using regular expression in R programming

My string is as below. [{\"period\":\"01-06-2018\",\"count\":5},{\"period\":\"01-07-2018\",\"count\":8},{\"period\":\"01-08-2018\",\"count\":9}] but I want only (only backslash) to be removed and it should look like below (using R programming…