I'm trying to write a regular expression for this.
I need it to grab the 9 digit number that's in brackets provided a '6 /Helvetica-Bold f' has appeared before it but not a '6 /Helvetica f'
6 /Helvetica-Bold f
6 /Helvetica
<-- any number of lines of other text -->
261 632 m(436243874)r 1 9 0 Endline <--- this would not match
6 /Helv...
I'm creating a regexp for password validation that will be used in a Java Application as a configuration parameter.
The regexp is:
^.*(?=.{8,})(?=..*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=]).*$
The password policy is:
At least 8 chars
Contains at least one digit
Contains at least one lower alpha char and one upper alpha char
Cont...
I want to use regex to find unknown number of arguments in a string. I think that if I explain it would be hard so let's just see the example:
The regex: @ISNULL\('(.*?)','(.*?)','(.*?)'\)
The String: @ISNULL('1','2','3')
The result:
Group[0] "@ISNULL('1','2','3')" at 0 - 20
Group[1] "1" at 9 - 10
Group[2] "2" at 13 - 14
Group[3] ...
Hello, am having problems with some Regex code can anyone help.
I have the following string of data see below:
abcd " something code " nothing "f <b> cannot find this section </b> "
I want to find the sections between " quotes.
I can get if to work fine using the following regax:
foreach (Match...
I am trying to write a regular expression that matches only any of the following:
{string}
{string[]}
{string[6]}
where instead of 6 in the last line, there could be any positive integer. Also, wherever string appears in the above lines, there could be int.
Here is the regular expression I initially wrote : {(string|int)(([]|[[0-9]]...
I have a problem where I need to see if the textbox entry is an alphanumeric value. The format for this entry Character(A-Z) then Number(0-9), where there's only one alphabet and Numbers can be as many as he wants.The lphabet should always come first.A minimum of 2 characters have to be entered.
Example is A100, A1.
It should not accept ...
I have this text:
<body>
<span class="Forum"><div align="center"></div></span><br />
<span class="Topic">Text</span><br />
<hr />
<b>Text</b> Text<br />
<hr width=95% class="sep"/>
Text<a href="Text" target="_blank">Text</a>
<hr />
<b>Text</b> -Text<br />
<hr width=95% class="sep"/>
**Text what i need.**
<...
I want to achieve a python version web regexbuddy,and i encounter a problem,how to highlight match values in different color(switch between yellow and blue) in a textarea,there has a demo what exactly i want on http://regexpal.com,but i was a newbie on js,i didn't understand his code meaning.
any advice is appreciated
...
could someone help me out with a piece of regex please? I want to stop the user entering any charachter other than a-z or a hyphen -
Hope someone can help me.
Thanks
...
Hello, i have the following problem.
I want to escape all special characters in a python string.
str='eFEx-x?k=;-'
re.sub("([^a-zA-Z0-9])",r'\\1', str)
'eFEx\\1x\\1k\\1\\1\\1'
str='eFEx-x?k=;-'
re.sub("([^a-zA-Z0-9])",r'\1', str)
'eFEx-x?k=;-'
re.sub("([^a-zA-Z0-9])",r'\\\1', str)
I can't seem to win here. '\1' indicates the spe...
Hello,
i have a text and want to find all occurences of: prefix RM-EC + 3 digit number. For example RM-EC001, RM-EC099 or RM-EC100. But RM-EC99 should not be found.
Thank you.
...
I need to insert a string directly after the open anchor ends (where the anchor content starts).
Here is my code:
<ul id="menu-topmenu2" class="menu">
<li id="menu-item-5" class="menu-item menu-item-type-post_type menu-item-5">
<a href="http://localhost/domain/barnlager.se/?page_id=2">
About
</a>
...
Hi,
I'm trying to replace all ul tags with a level0 class, something like this:
<ul>
<li>Test
<ul class="level0">
...
</ul>
</li>
</ul>
would be processed to
<ul>
<li>Test</li>
</ul>
I tried
$_menu = preg_replace('/<ul class="level0">(.*)<\/ul>/iU', "", $_menu);
but it's not working,...
I have a CSV containing list of 500 members with their phone numbers. I tried diff tools but none can seem to find duplicates.
Can I use regex to find duplicate rows by members' phone numbers?
I'm using Textmate on Mac.
Many thanks
...
Hi..all
I am developing a login form with User Name and Password. I want the user to create the username in a specified format. So i am using RegularExpressionValidator for the username. What is the Validation Expression for this format.
The format is:
xyz\\t4z4567 (characters are not case sensitive)
Rules:
The username will be cr...
I have address data that is surrounded by random text. Is there a way to extract this data either with a call to a web service or some vb.net function?
example: 1111 S WILSON ROAD APT B8 CITY STATE 55555 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...
How can I iterate over multi-line regexp matches using sed and bash?
I'm trying to generate some quick docs from comments in a file, like so:
/**
* @name myFun
* @return {int}
*/
I can extract every comment block using sed -n -e '/\/\*\*$/,/\*\/$/p', but now I'd like to stuff each match into a bash array so I can parse the details ...
Hello, I'm in the process of updating a program that fixes subtitles.
Till now I got away without using regular expressions, but the last problem that has come up might benefit by their use. (I've already solved it without regular expressions, but it's a very unoptimized method that slows my program significantly).
TL;DR;
I'm trying ...
I'm not very well versed with regular expressions. I've had to use them, maybe once every few years, and that was mostly for course work. Anyways, the following question should be a fairly straight forward question/answer for anyone familiar with regular expressions.
I need to ensure that the text entered into a field follows the follow...
I'm not sure how to accomplish this with a regular expression (or if I can; I'm new to regex). I have an angle value the user will type in and I'm trying to validate the entry. It is in the form degrees-minutes-seconds. The problem I'm having, is that if the user mistypes the seconds portion, I have to catch that error, but my match f...