word-boundary Questions

1

Solved

I have a data.frame named all that has a column of factors, these factors include "word","nonword" and some others. My goal is to select only the rows that have the factor value "word". My ...
Usable asked 28/7, 2013 at 7:31

1

Solved

Regular expression engines have a concept of "zero width" matches, some of which are useful for finding edges of words: \b - present in most engines to match any boundary between word and non-wor...

5

Solved

In JavaScript: "ab abc cab ab ab".replace(/\bab\b/g, "AB"); correctly gives me: "AB abc cab AB AB" When I use utf-8 characters though: "αβ αβγ γαβ αβ αβ".replace(/\bαβ\b/g, "AB"); the word...
Telesis asked 21/5, 2010 at 11:1

2

Solved

I was using the standard \b word boundary. However, it doesn't quite deal with the dot (.) character the way I want it to. So the following regex: \b(\w+)\b will match cats and dogs in cats.dog ...
Irretrievable asked 28/12, 2012 at 18:53

1

Solved

I know most regular expression engines, including the one in JavaScript have \b to match a word boundary, be it at either the start or end of a word. But Vim also has two more specific regular exp...
Byroad asked 19/11, 2012 at 12:15

5

Solved

A colleague asked me about a Regular expression problem, and I can't seem to find and answer for him. We're using boundaries to highlight certain lengths of text in a text editor, but here's some ...
Haplology asked 3/6, 2010 at 13:46

2

Solved

I'm getting unexpected results with this code: 'foo'.match(new RegExp('\bfoo\b')); // Returns null Why is this returning null while this one returns "foo"? 'foo'.match(new RegExp('foo')); // Re...
Turaco asked 17/2, 2011 at 2:57

3

Solved

I am working on a solution to split long lines of Khmer (the Cambodian language) into individual words (in UTF-8). Khmer does not use spaces between words. There are a few solutions out there, but ...

2

I have a JavaScript regular expression which basically finds two-letter words. The problem seems to be that it interprets accented characters as word boundaries. Indeed, it seems that A word bou...
Calvary asked 12/9, 2010 at 4:28

3

Solved

i want to check if a string contains a field value as a substring or not. select * from mytable where instr("mystring", column_name); but this does not search on word boundaries. select * from m...
Imbecilic asked 24/1, 2010 at 11:2

3

Solved

I'm wanting to match a list of words which is easy enough when those words are truly words. For example /\b (pop|push) \b/gsx when ran against the string pop gave the door a push but it popped b...
Kktp asked 26/4, 2009 at 3:46

© 2022 - 2024 — McMap. All rights reserved.