I understand PCRE pretty well, but MySQL's regular expression flavor seems to get the best of me.
Can someone help me correct this expression? The PCRE equivalent would be &\w+;
I'm guessing something like:
select body from email where body rlike '&[[:alpha:]]+;%'
Bonus:
MySQL's docs on their regex flavor seem kinda sparse. Does any...
Are there any known regular expressions out there to validate credit card track 1 and track 2 data?
EDIT:
From Wikipedia:
The information on track 1 on financial cards is contained in several formats: A, which is reserved for proprietary use of the card issuer, B, which is described below, C-M, which are reserved for use by ANSI Subco...
Greetings,
I need to implement a jquery based validation for a text field that contains a phone number, for that I need the regular expression of these two strings, I am requesting this because I am very naive with RegEx:
First One:
0(5NN) NNN NN NN
Second One:
0(53N) NNN NN NN
N means an integer between 0-9
...
I need to improve on a regular expression I'm using. Currently, here it is:
^[a-zA-Z\s/-]+
I'm using it to pull out medication names from a variety of formulation strings, for example:
SULFAMETHOXAZOLE-TRIMETHOPRIM 200-40 MG/5ML PO SUSP
AMOX TR/POTASSIUM CLAVULANATE 125 mg-31.25 mg ORAL TABLET, CHEWABLE
AMOXICILLIN TRIHYDRATE 125 ...
I'm fairly new to figuring out how Regex works, but this one is just frustrating.
I have a massive XML document with a lot of <description>blahblahblah</description> tags. I want to basically remove any and all instances of <description></description>.
I'm using Eclipse and have tried a few examples of Regex I've found online, but noth...
x = "abcdefg"
x = x.match(/ab(?:cd)ef/)
shouldn't x be abef? it is not, it is actually abcdef
Why is it that my ?: not having any effect? (of course my understanding could very well be wrong)
...
How can I 301 redirect any URL that starts with a number between 1 - 9999, for example
domain.com/12/something/anotherthing
domain.com/378/product/widgets
domain.com/2560
...
Ok I know everyone is going to tell me not to use RegEx for parsing HTML, but I'm programming on Android and don't have ready access to an HTML parser (that I'm aware of). Besides, this is server generated HTML which should be more consistent than user-generated HTML.
The regex looks like this:
Pattern patternMP3 = Pattern.compile(
...
I'm working on using Find/Replace to change a bunch of labels to DataBound text.
Basically I'm trying to convert something like
<asp:Label ID="lbl213" runat="server" />
to
<%# Eval("_213")%>
Here's my regex
<asp:Label ID="lbl{\d*}" runat="server" />
Here's my replace
<%# Eval("_\1")%>
Here's my Error
Unknown argumen...
Input "col1, col2, col3, coln"
Output "@col1, @col2, @col3, @coln"
...
i want a regular expression to validate string to have only text,operators and these brackets ([ ])
...
I have list of catalog paths and need to filter out some of them. My match pattern is in a non-Unicode encoding.
I tried the following:
require 5.004;
use POSIX qw(locale_h);
my $old_locale = setlocale(LC_ALL);
setlocale(LC_ALL, "ru_RU.cp1251");
@{$data -> {doc_folder_rights}} =
grep {
# catalog path pattern in $...
Hello,
By using the pattern from here, I want to check while a user fills in the #id_phone text input field, if it is matching to the pattern, use the value of #id_phone to fill #id_new_phone's value.
This doesn't seem to work for me.
$('#id_phone').change(function() {
var myPattern = new RegExp(^0\(5\d{2}\) \d{3} \d{2} \d{2}$);
...
I want to be able to find and highlight a string within a string BUT I no not want to remove the space.
So if my original string is :
There are 12 monkeys
I want to find '12 mon' and highlight those characters ending up with :
There are < font color='red' >12 mon< /font >keys
BUT I also want the same result if I search for '12mon' ...
I have read that to match a word inside of a string using Regular expressions (in .NET), I can use the word boundary specifier (\b) within the regex. However, none of these calls result in any matches
Regex.Match("INSERT INTO TEST(Col1,Col2) VALUES(@p1,@p2)", @"\b@p1\b");
Regex.Match("INSERT INTO TEST(Col1,Col2) VALUES(@p1,@p2)", @"\bI...
I want a regular expression for only accepting
0-9999
No spaces, no letters.
However, "blank"(empty) is allowed.
...
I'm trying to get to grips with regular expressions:
I have a database connection string and I'd like to use a regular expression to identify specific Keys and Values within it.
For example
server=foo;database=bar;uid=foo;pwd=bar
I'd like something to return "database=bar;" using the 'database' key to identify it, ideally it would b...
Hi,
Basically I was trying to replace the part of string with its actual value which comes immediately after oracle operators. I can do this for limited operators list like {=,>,<} but I wonder that is there any way out to gather all the operators rather than giving them by hands? For instance, I have this string; "a = xyz", then I will...
Hello!
As the header is implying I'm trying to retrieve a certain line of numbers from a richtextbox and then put it into a separate textbox. I've tried this code below but it doesn't wanna work with me. It's probably way wrong and there's probably easier ways of doing it but I'm quite new to this stuff and I would appreciate all the he...
I have about 100k Outlook mail items that have about 500-600 chars per Body. I have a list of 580 keywords that must search through each body, then append the words at the bottom.
I believe I've increased the efficiency of the majority of the function, but it still takes a lot of time. Even for 100 emails it takes about 4 seconds.
I ...