Hi Everyone,
I'm trying to check if a name has invalid characters, so far I've managed to get everything I need apart from checking for capitalization, I've tried using
SELECT BINARY('jiLl') REGEXP('[[:upper:]]+');
but unfortunately that also flags properly formatted names, as in (Jack), is it possible to have the regex ignore the fir...
all i want do is change my querystring from this
result/?q=Southview+Guesthouse
to this:
result/?q=Southview-Guesthouse.
I've done similar stuff with PHP but never mod_rewrite, has anyone got any ideas? Thanks.
...
I was just wondering if it is possible to have a regex that is searching for a string like '\bfunction\b' that will display the line number where it found the match?
...
I want to replace something like http://www.somesite.com/videos/video23.mp4 with something like <some_my_tag>http://www.somesite.com/videos/video23.mp4</some_my_tag>. How to do it in PHP?
...
I have a table that contains a list of websites.
I have a sql variable @url, I want to select all the rows where the website is equal to @url. However, if there is no subdomain I want to match www and the root domain.
So, if @url='http://website.com' it should match both 'http://website.com' and 'http://www.website.com'
I'm currentl...
I'm parsing some text from an XML file which has sentences like
"Subtract line 4 from line 1.", "Enter the amount from line 5"
i want to replace all occurrences of line with line_
eg. Subtract line 4 from line 1 --> Subtract line_4 from line_1
Also, there are sentences like "Are the amounts on lines 4 and 8 the same?" and "Skip lines 9...
I am trying to remove quotes from a string. Example:
"hello", how 'are "you" today'
returns
hello, how are "you" today
I am using php preg_replace.
I've got a couple of solutions at the moment:
(\'|")(.*)\1
Problem with this is it matches all characters (including quotes) in the middle, so the result ($2) is
hello", how 'are ...
I just want to create a regular expression out of any possible string.
var usersString = "Hello?!*`~World()[]";
var expression = new RegExp(RegExp.escape(usersString))
var matches = "Hello".match(expression);
Is there a built in method for that? If not, what do people use? Ruby has RegExp.escape. I don't feel like I'd need to write...
Hi All
I need help in regular expressions, match and replace pattens. I am working on rates.
my rates can be like
345.00
456
2345.90
341.34
I have to check if the rate ends in 9, if not i have to end the rate with 9 and a $ symbol.
The rates after running the rule should become
$349.00
$459.00
$2349.00
$339.00
I am storing the r...
Hi. Please help me to make a Regular Expression with following rule -
Max number can be 9999.99
Should be non-negative
Can not be 0, but 0.01 and so on is valid
So, I need a non negative number between 0.01-9999.99
...
Looking for some black magic that will match any string with "weird" characters in it. Standard ASCII characters are fine. Everything else isn't.
This is for sanitizing various web forms.
...
how can i get a regular expression to match whole words like grand and not match mygrandma.
for example, i wish to replace "grand" with "total",
so
"the grand sum is 100" should become "the total sum is 100".
however
"my grandma likes apples" should not become "my totalma likes apples".
...
i want it match only the end of every word
example:
"i am test-ing., i am test.ing-, i am_, test_ing,"
output should be:
"i am test-ing i am test.ing i am test_ing"
...
I'm using URL Rewrite module in IIS7 and using the User Friendly URL Rule template.
I'm trying to get URLs like:
Something/param1/something/param2/something/param3/something/something2/ etc.etc.
to rewrite to
SomethingEnd.aspx?param1=something¶m2=something¶m3=something/something2& etc.etc.
Using the templates, it automatic...
Im trying to do a regex where I can find all html tags, but for each one, each opening and closing tag must be the same. Heres what I mean: (Yes I only want max 3 letters)
preg_match_all("/\<[a-z]{1,3}\>(.*?)\<\/[a-z]{1,3}\>/", $string, $matches);
Where the 2 [a-z]{1,3} are, I want those to be the same, so it doesn't match <b> with <\...
Hi,
In my <mt:EntryBody> text I have few urls which I want to change the pointing address.
http://www.myblog.com/blog/content/fruit/apple.html
to
http://www.myblog.com/blog/apple/
In this case word "fruit" and "apple" would be the variable. I would like to use regex_replace modifier to change every URL in EntryBody.
How would I w...
SearchPattern = (?<price1>[0-9]+)(?<price2>[9]?)+(.)(?<price3>[9]{2})
zero or more matches of 0-9 numbers followed by one or more 9 followed by 2 optional digits after the dot.
I did not understand, what does price1, price2, price3 means?
can someone help me here.
ReplacementPattern = (?<price1>[0-9]+)(?<price2>[0-9]{1})+(.)(?<price3...
As I am new for the REGEX i am not able to solve below thing.
And please share some parser related links so the i can learn it.
I am facing problem in solving int below SQL statement.
Its more line added to the previous INPUT.
Please help me to slove this.
DECLARE
numerator NUMBER;
BEGIN
SELECT x, y INTO numerator, denominator FROM...
I found that findall(r'(ab)+', "ababababab") can only match the ["ab"]
>>> re.findall(r'(ab)+', "ababababab")
['ab']
i just know that using r'(?:ab)+' can match all the characters
>>> re.findall(r'(?:ab)+', "ababababab")
['ababababab']
Why does this happen?
...
What is the problem with parsing the blank/whitespace?
scala> object BlankParser extends RegexParsers {
def blank: Parser[Any] = " "
def foo: Parser[Any] = "foo"
}
defined module BlankParser
scala> BlankParser.parseAll(BlankParser.foo, "foo")
res15: BlankParser.ParseResult[Any] = [1.4] parsed: foo
scala> Blank...