Skip to main content
3 votes
0 answers
129 views

I would like to match a string that may contain non-ASCII characters using a regular expression in Go. After writing some tests, I discovered some surprising behavior that I'd like to check if it's ...
Zev Chonoles's user avatar
  • 1,363
0 votes
1 answer
96 views

Applicable for use in a bash script match substring as whole word only in parent string? For example parent string: A='enp1s0 enp2s0 enp3s0 enp4s0 lo tailscale0' And substring: B='enp1s' I have ...
Dachshund Digital's user avatar
9 votes
1 answer
433 views

I noticed that the semantics of the Java Regex word-boundary matcher \b changed significantly with Java 21. Up until (at least) Java 17, it used to support Unicode, so the regex a\b.* DID NOT match ...
Victor Mataré's user avatar
0 votes
1 answer
180 views

I am trying to do do a word search in a Snowflake string and assert a word boundary using '\b' select regexp_like(lower('A path down to the street'), '\\bpath\\b'); The above query should return ...
Graleon3's user avatar
-1 votes
1 answer
65 views

I want to rephrase that: I need a corpus of German words so that I can check if a segment is a word. My solution so far is to take the string, check if it's in the dictionary and if not, delete the ...
kiwi-123's user avatar
-1 votes
2 answers
156 views

How can I rewrite my anchor to be more general and correct in all situations? I have understood that using \b as an anchor is not optimal because it is implementation-dependent. My goal is to match ...
0jnats3's user avatar
  • 172
0 votes
1 answer
57 views

I am filtering some pathway names, and I want to include only pathways that contains: "HEMATOPOIETIC", "ERYTHROCYTE", "ERYTHROID", "STEM", "STEMNESS", ...
daddabi's user avatar
0 votes
2 answers
128 views

We are auto-formatting hyperlinks in a message composer but would like to avoid matching links that are already formatted. Attempt: Build a regex that uses a negative lookbehind and negative lookahead ...
willbeing's user avatar
  • 435
0 votes
3 answers
592 views

The following regex (taken from here) splits a string by characters length (e.g. 20 characters), while being word-aware (live demo): \b[\w\s]{20,}?(?=\s)|.+$ This means that if a word should be "...
OfirD's user avatar
  • 10.7k
1 vote
1 answer
1k views

I'm trying replace CT with COURT regardless of where it appears in a string (using Snowflake SQL). I would expect this to work: select regexp_replace('36 HERITAGE CT', '\bCT\b', 'COURT'), ...
Evan Hobbs's user avatar
  • 3,692
1 vote
1 answer
129 views

Python3: import re k = "X" s = "X测试一Q测试二XQ测试三" print(re.split((r"\b" + k + r"\b"), s)) Output: ['X测试一Q测试二XQ测试三'] Expected: ['', '测试一Q测试二XQ测试三']
Sakurai's user avatar
  • 106
1 vote
1 answer
112 views

I'm trying to come up with a Java regex which matches a word even when there is a \n in the input text. Kindly note that \n is supposed to appear as raw string. I am using the typical word boundary \...
pikaraider's user avatar
0 votes
0 answers
10 views

I want to match M.S. as word in text with: re.search(r"\b(M.S.)\b", "M.S. in computer science.") re.search(r"\b(M\.S\.)\b", "M.S. in computer science.") But ...
user avatar
-1 votes
1 answer
486 views

I have a regex to match a word in a long text, like this: word = "word" text = "word subword word" def char_regex_ascii(word): return r"\b{}\b".format(re.escape(word)...
Paolo Magnani's user avatar
0 votes
1 answer
193 views

I am building a Scanner and can't seem to find a way to identify operators like "if" or "else" using JFlex & Regex. Since JFlex doesn't fully conform I can't use word-boundary ...
JoseSG's user avatar
  • 3

15 30 50 per page
1
2 3 4 5
13