A customer asked me to prevent users from typing common passwords, but permit them to use only alphanumeric passwords.
Do you know a regular expression to use in the built in PasswordStrengthRegularExpression option?
Edit: I know is pretty vague, and that what I told the client. The definition is something like
Do not allow the same ...
Hi,
Does anyone know how to validate the format of a url in Java using regex?
Thanks
...
I have everything in place to create slugs from titles, but there is one issue. My RegEx replaces spaces with hyphens. But when a user types "Hi there" (multiple spaces) the slug ends up as "Hi-----there". When really it should be "Hi-there".
Should I create the regular expression so that it only replaces a space when there is a cha...
I want to match a part of a line for example in the sentence:
"The super id=42 or something."
I want to return the number 42.
echo "The super id=42 or something" | grep -o 'id=[0-9]+' | sed 's/id=//'
Would return the correct answer, but is there a more elegant way of solving this, for example by using only one tool?
...
I am trying to check if a html document includes script tags that are not empty using regular expressions. The regular expression should match any script tag with a content other than whitespaces or linebreaks.
I have tried
<script\b[^>]*>[^.+$]</script>
but this regex only finds script tags with one space.
...
Hi,
I'm trying to get the url portion of the following string:
url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)
So the required part if images/ui-bg_highlight-soft_75_cccccc_1x100.png.
Currently I've got this:
url\((?<url>.*)\)
But it seems to be choking on the following example:
url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50...
Hi, so I have multiple HTML files which I need to get some praticular data from, I mean theres a bunch of non relative information in this HTML files, but I need just lets say things that are between the <div class="myInfo"> and </div>, after getting this information I want to handle it in my own PHP page, so for example I can insert thi...
Given a string that ends in a whitespace character return true.
I'm sure I should be able to do this with regular expressions but I'm not having any luck. MSDN reference for regular expressions tells me that \s should match on a whitespace, but I can't figure the rest out.
...
Hi,
I'm trying to write a regular expression that will strip all tag attributes except for the SRC attribute. For example:
<p id="paragraph" class="green">This is a paragraph with an image <img src="/path/to/image.jpg" width="50" height="75"/></p>
Would be returned as:
<p>This is a paragraph with an image <img src="/path/to/image.jp...
Hi,
I'm using an sql to replace credit card numbers with xxxx and finding that REGEX_REPLACE does not consistently replace everything. Below is the SET command i'm using on the SQL
SET COMMENTS_LONG =
REGEXP_REPLACE (COMMENTS_LONG,'\D[1-6]\d{3}.\d{4}.\d{4}.\d{3}(\d{1}.\d{3})?|\D[1-6]\d{12,15}|\D[1-6]\d{3}.\d{3}.?\d{3}...
I want to sort out specific files depending on their names, i want a regex that returns true for file names like : 01.mp4, 99.avi, 05.mpg.
the file extensions must match exactly to the ones that i want and the filename must start with characters which can not be longer than 2 characters. the first part is done but the file extensions ar...
I have a string which contains a contiguous chunk of digits and then a contiguous chunk of characters. I need to split them into two parts (one integer part, and one string).
I tried using String.split("\D", 1), but it is eating up first character.
I checked all the String API and didn't find a suitable method.
Is there any method for ...
I need a regex for PropertyName e.g. HelloWorld2HowAreYou would get:
Hello HelloWorld2 HelloWorld2How etc.
I want to use it in C#
...
Hello, I was wondering what could be the fastest and the easiest way to grab text that is between tags in string.
For example i have this string: Lorem ipsum <a>dolor sit amet</a>, <b>consectetur</b> adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
And i need to find text that is between tags <a> </a> ...
Ok, this one has been driving me up the wall...
I have a xslt function that is supposed to split out the Zip-code part from a Zip+City string depending on the country. I cannot get it to work! This is what I got so far:
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/functi...
This should be easy, but I've managed to stump 2 people so far at work & I've been at it for over 3 hours now, so here goes.
I need to replace a+ with aplus (along with a few other cases) with the Python re module.
eg. "I passed my a+ exam." needs to become "I passed my aplus exam."
Just using \ba+ works fine most of the time, but fai...
I have the following input string:
key1 = "test string1" ; key2 = "test string 2"
I need to convert it to the following without tokenizing
key1="test string1";key2="test string 2"
...
Hi, I'm looking for a custom RegEx expression (that works!) to will validate common phone number with area code entries (no country code) such as:
111-111-1111
(111) 111-1111
(111)111-1111
111 111 1111
111.111.1111
1111111111
And combinations of these / anything else I may have forgotton.
Also, is it possible to have the RegEx ex...
I have a very simple regex question. Suppose I have 2 conditions:
url =http://www.abc.com/cde/def
url =https://www.abc.com/sadfl/dsaf
How can I extract the baseUrl using regex?
Sample output:
http://www.abc.com
https://www.abc.com
...
Is there a regex to get youtube video links or ids from embedded youtube videos on webpages?
...