My email string looks something like this;
[email protected]?subject='Unsubscribe LIST
[email protected]'&body=Unsubscribe I am currently using the following Regex to get email addresses from a string. It currently onl
I have the following string: < \0\"\0E\0x\0t\0e\0n\0s\0i\0b\0i\0l\0i\0t\0y\0,\0v\0e\0r\0s\0i\0o\0n\0=\0\\\0\"\07\0.\00\0.\03\03\00\00\0.\00\0\\\0\"\0,\0p\0u\0b\0l\0i\0c\0K\0e\0y\0T\0o\0k\0e\0n\0=\0\\\0\"\0B\00\03\0F\05\0F\07\0F\01\0
How can I match a series of words followed by a word different from x? For instance, how can I match at the cost of followed by a word different from some? I have tried the following, but to no avail: <rule id="AT_THE_COST_OF_!SOME" name=&quo
Unfortunately, I'm not yet a regex expert and therefore fighting with the following problem: Assuming I've got a Java stack trace including multiple chained exceptions, what I want to reach is extracting the last line starting with "Caused by".
I'm trying to make a "API" for a website which I don't own, and trying to scrape information off pages, however I've tried suggestions on stackoverflow and other locations about DOM and regex, which usually require a context or specific div id t
Right now I am new to using regexes so I would really appreciate your help. I have a really large string (I am parsing an as3 file to json) and I need to locate for those trailing commas out there in the objects.. This is the regex I am using public
I have a very messy data file, that can look something like this ======== Line 1 dfa====dsfdas== Line 2 df as TOTAL ============ I would like to delete all the lines with "=" only in them, but keep the line if TOTAL is also in the line. My code
Got stuck on this one, know it should be simple. But I have a list of unique IDs that looks like AB123456, XY584234, CDE987654. The last six characters mean something, so I need to find all rows that have the same last six characters as another (subs
I have a string like this: select name,lastname,email from contacts I want to replace the commas for +"|"+ and get something like this select name+"|"+lastname+"|"+email from contacts thats easy with string.Replace(",&qu
How can I get the numeric value from an string? In my case string is R1350.00 and Expected output: 1350 I tried the following: $result = preg_replace("/[^a-zA-Z0-9]+/", "", 'R1350.00'); but I also want to remove the last two string 00.
I need to get a specific class with javascript. This class is bootstrap's grid : col-md-8 I need to get the number, I try this : $class = $('div').attr('class'); $number = $class.match(/^col-md-./); I'm real beginner in regex, please help me. EDIT :
I have a string $str = "xxxxxx Code File(s) Name:Some_thing.c CodeFile(s) Version:27 Design Document:some_other_design.doc Module Design Document Version:43 somexxxxxxxxxx Compiler Version:9.5 Doc Type:Word xxxxxx"; where xxxxx represents any ch
In R I have a character string that looks like the following x <- c("20130603 00:00:03.102","20130703 00:01:03.103","20130804 00:03:03.104") I would like to to look like the following by using a single gsub command (rather
I have a variable which contains "j_id0:j_id11:i:f:pb:d:MyFieldName.input" (without the quotes). Now I would like to capture "MyFieldName". I had this: var test = "j_id0:j_id11:i:f:pb:d:MyFieldName.input"; var testRE = test.m
I want to trim the last occurring numeric characters from the String Eg: "abc123" => "abc" "abc12xyz34" => "abc12xyz" Written below snippet to extract it. Just want to explore if this can be done by regex priv
I need to create an expression matching a whole number followed by either "seconds" or ""minutes" I tried this expression: ([0-9]+)\s+(\bseconds\b)|(\bminutes\b) It works fine for seconds, but not minutes. E.g. "5 seconds&quo
I have a situation where I have text which contains URL links. The links are in 2 forms www.stackoverflow.com <a href="http://www.stackoverflow.com">Stack over flow</a> I am trying to create a simple function that uses regex that wil
I'm writing a method which returns an function argument by its number. protected function parseArgs($str, $args) { return preg_replace('|#(\d)|e', '$args[\\1 - 1]', $str); } $str - a string with '#N' where N is a number of argument $args - array of a
I have a file that I am reading, and searching the entire file for a certain pattern. Here's sample line: DATA "1354236384craan18p.1354236392craan18p.1354668684AR_ESCALATORCase HD0347023 was automatically closed on 5/12/2012 1:51:24 p.m.." "
I've never been good with regex and I can't seem to get this... I am trying to match statements along these lines (these are two lines in a text file I'm reading) Lname Fname 12.35 1 Jones Bananaman 7.1 3 Currently I am using this for a while stateme
I have: RewriteCond %{HTTP_HOST} ^MYDOMAIN\.com$ [NC] RewriteRule ^(.*)$ http://www.MYDOMAIN.com/$1 [L,R=301] RewriteCond %{HTTPS} !=on RewriteCond %{REQUEST_URI} ^/(user|admin|cart) RewriteRule ^(.*)$ https://www.MYDOMAIN.com/$1 [R=301,L] This effec
I am currently retrieving some information from a text file (.txt) that contains some paragraphs. When I retrieve the String from the text file I want to split it so that I each paragraph is in a String object. Here is the text I get from the text fi
I am dealing with an SQL injection and I need to replace sql params in coldfusion querytags by cfquerparam tags. For this I am matching anything that looks like the params in this: select * from table where test = #var2#, test ='#var3#' test2 like '%
I am using this regex to validate for the phone number: ^(\\([2-9]\\d{2}\\)|[2-9]\\d{2})[- ]?\\d{3}[- ]?\\d{4}$ However, when I test the input of any 10-digit phone number without dashes or spaces, such as 4042128246, the number does not match. How c
I have a string like foobar1, foobaz2, barbar23, nobar100 I want only foobar, foobaz, barbar, nobar and ignoring the number part.If you want to strip out things that are digits, a regex can do that for you: var s = "foobar1"; s = s.replace(/\d/g
I'm trying to write a "suggestion search box" and I cannot find a solution that allows to highlight a substring with javascript keeping the original case. For example if I search for "ca" I search server side in a case insensitive mode
I have to extract all email addresses from some .txt documents. These emails may have these formats:
[email protected] {a, b, c}@abc.edu some other formats including some @ signs. I choose ruby for my first language to write this program, but i don't know ho
Lets say I have this string $string = "<html> <body> <h1> <b>aaa</b> bbbb "; I want the result to be "h1" because it is the latest unclosed tag another example if the string is $string = "<body>
I'm developing a single serving site in PHP that simply displays messages that are posted by visitors (ideally surrounding the topic of the website). Anyone can post up to three messages an hour. Since the website will only be one page, I'd like to c
I am using the vim editor and I wanted to empty out all methods in the class, for instance class A { public: int getNumber() const { return number; } void setNumber(int num) { number = num; } }; I wanted to have a regex where I could substitute so th