2
votes
1answer
86 views

Using C-style arrays as backend for STL string operations

I'm writing a library to read some specific file formats. The file are being read with memory mapped files (boost::interprocess templates). On these files I have to do some searches with std::regex. ...
4
votes
3answers
40 views

PHP - remove duplicate syllable word

i'm new and wanna know how to using regex in php. if i have text like "haha" "abcabcabc" "hehehe" "cupcupcupcup" (contain duplicate of syllable word). How to remove that text? (say ...
0
votes
1answer
34 views

How to do find/replace case insensitive only in the beginning part of the string?

I want to remove "I will" at the beginning of a string. Those "I will" words could be uppercase/lowercase, so I will need to match for case insensitive. But I only want to remove those words if they ...
0
votes
5answers
46 views

How do I remove all symbols from the beginning and end of a string, if any?

Keep only the alphabet and numbers. --I have a dog!!! should result in I have a dog I have a dog. should result in I have a dog
0
votes
1answer
40 views

R- regex index of start postion and then add it to a string?

So far i have been able to merge two files and get the following dataframe (df1): ID someLength someLongerSeq someSeq someMOD someValue A 16 XCVBNMHGFDSTHJGF NMH T3(P) 7 A 16 ...
1
vote
3answers
77 views

Couldn't remove a single quotes from a string?

This is my string: String str = "CREATE TABLE `patiant` ( `ID` varchar(45) NOT NULL, `PATIANT_NAME`..."; I tried using replace and replaceAll methods but didn't work. Here you can see what I'v ...
1
vote
2answers
81 views

How to divide string using regex

I have String like this: String s = "1234567890"; I'd like use split("regex") to get this output: 12 23 34 45 56 67 78 89 90 What regex should I use?
1
vote
2answers
66 views

Regular expression with String.split() [duplicate]

How can I implement regular expression to String.split() to seperate values by spaces and ignore double quoted text? Like in the below example. hello "Luis Anderson" your age is 30 and u will get ...
1
vote
4answers
43 views

Regex using java string.replaceall

I am looking to replace a java string value as follows. below code is not working. cleanInst.replaceAll("[<i>]", ""); cleanInst.replaceAll("[</i>]", ""); ...
1
vote
4answers
38 views

using sed to substitute a string

I have a line like this : 22.665774 Fr RMSG 0 0 1 1 18 11 Rx 0 308002 5 20 1d6 x 20 20 a8 4f 35 40 1b 00 0f 08 f7 89 ff fa ff f3 35 80 49 00 00 00 00 30 00 00 80 ab 4b 54 40 f0 00 fc 714a81 1 ...
14
votes
8answers
575 views

Strip out numbers from a string

We have a bunch of strings for example: c1309, IF1306, v1309, p1209, a1309, mo1309. In Python, what is the best way to strip out the numbers? All I need is: c, IF, v, p, a, mo from above example.
1
vote
3answers
44 views

How can i use special characters as exposing in string

How can i use special characters as exposing in string varible like ⁽¹⁾ ? In order to have : String str="⁽¹⁾"; Thank you in advance
0
votes
1answer
60 views

Replace a blank space followed by text with a blank space using string replace

I have a log file from which i am trying to remove all the unwanted text except the digits(0-9). I am able to use string.replace('','') function to remove everything and get the desired, however, at a ...
0
votes
2answers
38 views

Regular expression not returning propper matches

I am currently experiencing some problems with my regular expression on my PHP server. This is my current regulair expression: /\{content="(?:([^"\|]*)\|?)+"\}/ And I want it to match: ...
0
votes
2answers
36 views

Regular expression for name with parentheses

so first time trying to come up with regular expression validation and im a bit confused. User populates the 'name' section of our form like so: Lastname, firstname (department). but it could also ...
4
votes
4answers
163 views

How to really split string into string arrays without losing its part in C#?

What I have string ImageRegPattern = @"http://[\w\.\/]*\.jpg|http://[\w\.\/]*\.png|http://[\w\.\/]*\.gif"; string a ="http://www.dsa.com/asd/jpg/good.jpgThis is a good dayhttp://www.a.com/b.pngWe are ...
0
votes
5answers
41 views

Convert part of string to double with regex

My application seem crash on "wrong format", I have this: Match m = Regex.Match(value, "[0-9]+[.[0-9]+]?"); double number = Convert.ToDouble(m.Value); return number; Point is to make string values ...
-4
votes
5answers
82 views

get an special Substring in c#

I need to extract a substring from an existing string. This String starts with uninteresting characters (include "," "space" and numbers) and ends with ", 123," or ", 57," or something like this where ...
1
vote
2answers
70 views

Using regex to verify an int, my way isnt working

I want to make sure a string is a legal int. This means that it must be a number (with no "."). However, spaces are allowed both at the beginning as well as after the legal value. The following ...
1
vote
1answer
39 views

use of regex to find a pattern and get the result

I really have a hard time with Regex expressions and I'm trying to do a string search and get the value that was found with regex. At this point I'm using a lot of .indexOf() and .substring() and so ...
2
votes
5answers
58 views

Remove <p>&nbsp;</p> from end of string?

Maybe a newbie question: I have a string like: $string = '<p>this is what we need.</p><p>&nbsp</p>'; How can I remove the last characters, i.e. ...
0
votes
4answers
56 views

How can I select a part from a big string starting in point A and ending in point B

My string is: [...] <div class="threads"> <a href="/adgagshsdh_t_54654321654" title="Title 2"> <a href="/adgagsdfdfhsdh_t_44654321654" title="Title 3"> <a ...
1
vote
2answers
126 views

How to use regular expressions to extract 3-tuple values from a string

I am trying to extract n 3-tuples (Si, Pi, Vi) from a string. The string contains at least one such 3-tuple. Pi and Vi are not mandatory. ...
0
votes
5answers
103 views

How do we extract parts of a string in Perl?

I am new in Perl. I have a string of this format: [ timestamp | integer | string ] Some other string here Sample string: [ 2013/05/28 21:39:02 | 2212 | MALFUNCTION ] Please check for ...
1
vote
1answer
105 views

Extract string pattern in C (no libs)

I'm reading a file with the following format: /* ...more text above */ [Text=WORKING CharacterOffsetBegin=73516 CharacterOffsetEnd=73523 PartOfSpeech=VBG Lemma=work] ...
0
votes
3answers
47 views

Regular expression for string Starting with Alphabet and have a space after alphabet

I need a regular expression to do the following example: string checker=" A Cat has catched the mouse" The regular expression should ensure that the first character should be an alpha character A-D ...
0
votes
3answers
67 views

Reading String from Java regular expression

I need to read a string from the paragraph which has format of "abc.xyz" format. I am very new for regular expression and i am stucked hear to read the format, please can any one help me out to get ...
-2
votes
4answers
110 views

How to split string into array of three characters, and the splitting start from the end of the string [duplicate]

I have the string data like Aabc123def457ghi123jkl950asd489are AB950asd489are ABC950asd489are and I want to split those into array of string like this ...
-1
votes
3answers
70 views

String Regular Expressions in java

I am very new for java,I need to take the words which has some format. I have a paragraph. in that I need totabe the words which has a.b format, I am very new for reqular expression usage. Please can ...
0
votes
2answers
59 views

Regex to match particular types of string and replace

I'm having a string with <link rid="bib*">222</link> and <link rid="fig1">333</link> now i want to replace all the occurance of the above text with rid="bib*", with ...

1 2 3 4 5 111
15 30 50 per page