Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
1 answer
43 views

textfield text (one or more than one) regex check Swift UIKit

I created the regex logic, it works correctly, but in addition to one textfield I can have several of them, I created a dictionary and a variable so that it gives me a bool value of true, provided ...
Albert Asadov's user avatar
1 vote
1 answer
741 views

In Swift how do you simply "make a variable" a RegexComponent?

I have code like this ... func blah() { if let r = someString.firstMatch(of: /([abc])(\d{2})$/) { blah blah .. String(r.1), String(r.2) } } Normally with a regex, i'd just keep the regex-guts ...
Fattie's user avatar
  • 13.9k
0 votes
1 answer
119 views

Emojis corrupted on iOS when using negation with unicode character class escapes

I'm using regular expressions to remove non-latin and non-emoji characters from strings. As Unicode character class escapes are now widely supported, I used them to simplify my expressions. const ...
Lizozom's user avatar
  • 2,261
0 votes
0 answers
63 views

How to make this regex split a paragraph into sentences when the sentence ends with quote or an abbreviation/initials that contains/ends with period?

I'm using this regex that was accepted as an answer in this question to split a paragraph into sentences, but the regex is splitting sentences at abbreviations/initials that contain/end with a period ...
Crunch's user avatar
  • 125
2 votes
2 answers
433 views

Use Regex with NSPredicate

Aim Using NSPredicate I would like to use Regex to match all strings beginning with "Test" I specifically want to use Regex and NSPredicate. Questions What mistake am I making? What is ...
user1046037's user avatar
  • 17.4k
2 votes
1 answer
104 views

.replace() with REGEX expression not displaying on mobile, but works fine on desktop

I wrote a very basic JS function to create a clock. It uses a very basic replace method to change a "," to a "|" symbol. The desired output is "Thursday, Jan. 12, 2023 | 10:00:...
Learn to Code's user avatar
1 vote
1 answer
194 views

Validation Check for non-english strings

I am trying to build an iOS app and I wish to validate whether a particular string that I have, is a valid email or not. The catch is, the string can be a non-english lanuage as well. Also, lets take ...
ShadowMonarch's user avatar
1 vote
1 answer
1k views

Regex for Minimum and Maximum Numbers in String in Swift [duplicate]

What is the regex for knowing if the number of characters in a string has minimum and maximum number of characters and should be numbers not letters or symbols? It doesn't have to match the same ...
jaytrixz's user avatar
  • 4,059
-1 votes
2 answers
434 views

JS regex not working on iPhone browser specifically - not sure why

I recently made some changes to code and was made aware that one of the pages that was updated does not work on the iPhone browser. Sure enough, it didn't, but worked in all other browsers I tested. ...
user756659's user avatar
  • 3,482
0 votes
0 answers
21 views

Regular Expression to match code blocks, Swift [duplicate]

I have code blocks that can looks like this: "func scrollViewDidScroll(_ scrollView: UIScrollView) {\n let offsetY = scrollView.contentOffset.y\n let contentHeight = scrollView.contentSize....
manubrio's user avatar
  • 459
0 votes
2 answers
160 views

Get last sentence from String after ". "(Dot And Space)

I am trying to get the last sentence from String after ". "(Dot And Space), Suppose I have a very long string and in that string, there are multiple ". "(Dot And Space) but I want ...
Vishal Parmar's user avatar
-2 votes
1 answer
532 views

Swift Replace all special characters [duplicate]

How can I replace all accented characters in a string with standard ASCII characters? Examples from: cartões to: cartoes from: notificações to: notificacoes
Paulo Rodrigues's user avatar
1 vote
0 answers
134 views

Regex to allow only number and single dot on android device

I have my angular application and has HTML template below: <input inputmode="numeric" id="amount1"> <input inputmode="decimal" id="amount2"> now ...
angularguy's user avatar
1 vote
1 answer
221 views

Regex Swift: How to find Two words OR Find Two words with a dash

I have two regex patterns in Swift, both work for each case separately: case twoWords = "(@\w+\s\w+)" = @User Name case twoWordsWithDash = "@(\w+\s\w+\-\w+)" = @User Name-Hyphen ...
Scott W's user avatar
  • 53
1 vote
2 answers
151 views

Removing wikitext hyperlinks in Swift

I'm trying to remove Wikitext hyperlink formatting and just get the link text, but everything I've tried either deletes nothing or deletes much more than expected. Here's the general pattern: [[user ...
David's user avatar
  • 117

15 30 50 per page
1
2 3 4 5
60