Hi,
Can anybody help me writting a regular expression to replace these characters with a empty string. Character list is given below.
public static char[] delimiters = { ' ', '\r', '\n', '?', '!', ';', '.', ',', '`', ':', '(', ')', '{', '}', '[', ']', '|', '\'', '\\', '~', '=', '@', '>', '<', '&', '%', '-', '/', '#' };
Thanks.
Subrat.
Hi,
I need a regex expression (PCRE) to match a integer number inside a string, being the string like : image89.jpg
I've tried many options without success.
I'm using preg_replace() by the way
My last attempt :
preg_replace('(\d+)', '$1', 'image89.jpg');
Sorry if this question is answered already. But I didn't find suitable answer.
I am having a string expression in C# which I need to convert to an int value or decimal anything. For example,
string strExp="10+20+30";
output should be=60.
how shall I do that???
I am getting uncaught exception: Syntax error, unrecognized expression: [@name='rbRewSelectionGroup'] when I load the page:
<script language="javascript">
$("input[@name='rbRewSelectionGroup']").click(function()
{
$(this).closest("form").submit();
});
</script>
I am not seeing it. I do not see anything wrong with this code at all. I do have the jQuery (1.4.2) library loaded with the page.
A frequent issue in code reviews is whether a numeric value should be hard-coded in the code or not. Does anyone know of a nice regular expression that can catch 'magic numbers' in code like:
int overDue = 30;
Money fee = new Money(5.25D);
without also getting a ton of false positives like for loop initialization code?
for (int i = 0; i < array.length; i++) {
}
can any one tell me regular expression for postalcode of Amsterdam, Netherlands for validation
EX. 1113 GJ
Postal code format according to Wikipedia (thanks to Pekka):
1011–1199 plus a literal suffix AA-ZZ,
e.g. 1012 PP
Related to my previous question, I have a string on the following format:
this {is} a [sample] string with [some] {special} words. [another one]
What is the regular expression to extract the words within either square or curly brackets, ie.
{is}
[sample]
[some]
{special}
[another one]
Note: In my use case, brackets cannot be nested. I would also like to keep the enclosing characters, so that I can tell the difference between them when processing the results.
Sorry for the potentially dumb question but I am trying to pull together a regular expression that will allow:
A number with 1 or 2 numbers before a decimal point, and 0-6 numbers after the decimal point. However I also need to allow the field to be blank if so required.
Valid Examples
0.952321
1.20394
12.12
25
Blank
Invalid Examples
123.45678
1.1234567
Please can anyone help?
I want to unlock one account in MS SQL Server. Before unlocking I have to check whether that account is locked or not.
I want to unlock only if the account is locked.
Is there any SQL query or stored procedure to get the "Locked" status of SQL user?
I am new to grep and awk - using Windows 7 (I downloaded grep and awk for windows from GnuWin).
I am have having trouble running this script:
grep -Fwf dictionary.txt frequency.txt | awk '{print $2 "," $1}'
I get the error:
awk: '{print
awk: ^ invalid char ''' in expression
I believe it might have something to do with having to use double quotes in Windows, but I tried all the combinations I can think of and still it doesn't work.
Can anyone help?
Thanks
I receive Date and time from CSV file
The received Date format is YYYMMDD (string) (there is no ":" ,"-","/" to
separate Year month and date).
The received time format is HH:MM (24 Hour clock).
I have to validate both so that (example) (i) 000011990 could be invalidated for date (ii) 77:90 could be
invalidated for time.
The question is ,
Regular expression is the right candidate for do so (or) is there any other way to achieve
it?
I have texts like this one:
this is a text in [lang lang="en" ]english[/lang] or a text in [lang lang="en" ]spanish[/lang]
I need to substitute them for:
this is a text in <span lang="en">english </span> or a text in <span lang="es">spanish</span>
I need a regular expression, not a simple replace. The languages in the lang tag can be whatever.
I have a HTML page and I want to fetch the result between two tags <b> and <BR>
<b>Defendants Name:</b>Donahue, Leah A <BR>
What is the regular expression to fetch the words between these two tags
Hello,
I would like a regular expression in this format. It Must match one of the following formats:
* (###)###-####
* ###-###-####
* ###.###.####
* ##########
Strip all whitespace. Make sure it's a valid phone number, then (if necessary) translate it to the first format listed above.
in Ms-Ajax
suppose iam downloading 3 files , no dependencies have been defined b/w them
Sys.loadScripts(['file1.js',file2.js',file3.js']);
a in which order these files will be loaded??
b in which order these files will be made available to requesting page??
Hi I'm trying to setup a RegexpValidator that only accepts a string of alphanumeric characters between 6-30 characters long and requires one number. I'm new to Regular Expressions and everything I've tried seems to keep returning an invalid ValidationRsultEvent. Here's a chunk of code:
<mx:RegExpValidator id="regexValidator" source="{passwordInput}" property="text"
triggerEvent="" valid="onPasswordValidate(event)" invalid="onPasswordValidate(event)" />
private function validateRegister():void
{
regexValidator.expression = "^(?=.*(\d|\W)).{6,30}$";
regexValidator.validate();
}
I have text that looks like:
My name is (Richard) and I cannot do
[whatever (Jack) can't do] and
(Robert) is the same way [unlike
(Betty)] thanks (Jill)
The goal is to search using a regular expression to find all parenthesized names that occur anywhere in the text BUT in-between any brackets.
So in the text above, the result I am looking for is:
Richard
Robert
Jill
I am looking for a regular expression (or other method if there is such a thing) for detecting bounce email messages. So far I have been going through our unattended mail box and adding strings that I find into a regex. I figured someone would have something that is already complete rather than me re-inventing the wheel.
Here is an example of what I have so far:
/reason: 550|permanent fatal errors|Error 550|Action: Failed|Mailbox does not exist|Delivery to the following recipients failed/i
Dear Masters! Is it possible to ensure, that only characters with codes between 0 and 255 will be accepted by regular expression, but all with the codes up to 256 not? Thank you!
Hello!
I use Windows XP Rus and want to know, what name has Cursor.name property in MS Accessibility for cursor when it looks like hand in Windows XP En.
Hi,
I have a ListView and ObservableCollection in my wpf application.
I want to bind linq expression to ListView:
lv_Results.DataContext = store.Where(x => x.PR > 5);
But when i add new elements to store collection, lv_Results doesnt updates.
How can i update ListView?
Hey everybody,
I am a novice TCL programmer.Here I go My 1st post with stackoverflow forum. I would like to write a regular expression that matches any & only the strings starts with character A and ends with B. Whatever the characters coming inbetween should be displayed. For instance AXIOMB as an input from the user which starts with A & end with character B. Here is my try regexp { (^A([C-Z]+)B$)} Thank you