Get the incoming Filepath, and then check if it falls into the following patterns:
e.g. /blog/category/*any number without space*.aspx /blog/archive/*any number without space*/*any number without space*/*any url characters without space*.aspx and extract the string in stars. How can I do that in c# together with regular expression pattern?
I am designing ASP.net Web pages and not sure if this would be the right way to do this.I am designing the web sites that will be accessed from either regular computers or mobile devices (phone).I was thinking to detect at very first page that whether users are coming from mobile browser or regular browser and direct to appropriate pages. So for mobile users, create/display separate UIs (rearrange controls to fit on mobile device) and for regular users, create/display separate UIs. The backend functionalities will be same, but just the UIs. Therefore, in this case I will create two separate projects in same solution, one for mobile UIs, and other one for regular UIs, but same code behinds.
I am trying to create a pop-up box that looks like a caption of a cartoon which is basicaly a square or rectangle with rounded corners all except for the bottom left.I don't want to use a graphic if possible, and am trying to use CSS to do it but can't quite get it. can use the border-radius for three of the corners that round off, but the left bottom corner that would be protruding out I can't get.
I would like to know what the expression for "letters only" is for my asp.net web application. I tried ^[A-Za-z] but it does not work I would also like a regular expression for "numbers only except "-"
I am trying to write a Regular Expression Validator to allow users to input any number (either positive or negative), except 0. I tried the followings but obviously they failed:
^[1-9-]{1,10}$ <= failed when the 2nd to n-th digit is 0
I am using a regex to detect forum tags within posts, such as "[quote]text[/quote]" and then replace them with HTML formatting. I posted a question Forum tags. What is the best way to implement them? about a problem with nested tags.
Right now this matches an opening and closing tag, with match groups for the tag name, the tag content, and an optional value like the value after the equals in this forum tag [url=www.google.com]click me[/url].
What I need is for the expression to match the opening tag OR the closing tag and have a match group containing the tag name (including the '/' for the closing tag). I then want to iterate through them sort of like this:
Dictionary<string, int> tagCollection = new Dictionary<string, int>(); inputString = Regex.Replace(inputString, @"expression I'm asking for here", match => {
[Code]....
So now, each tag is appended with a number and I could use the original regex to perform the tag functions and properly handle nested tags as separate tags.
I got this code from a regular expression library to get the src of the image found in a given input. However I can't get it to work because the double quotes(") in the regular expression is closing the string under the second parameter for the .Match function. I tried changing double quotes(") to " but it doesn't work too.
I have custom control for create user. I use RegularExpressionValidator with expression (?=W{1,}){7,} (lentgth min 7 character and must include not less 1 NotAlphaNumeric character) . I test this expression
function GetText(AInputText) { var VRegExp = new RegExp(/(?=W{1,}){7,}/); var VResult = VRegExp.test(AInputText); return VResult; }
it's work. But RegularExpressionValidator doesn't accept this expression for input - 1234567! or 12345qwer!
I removed some stuff for this thread, one being I put an r for some name that I do not want to expose here so just an fyi.Now, I would assume that this would or should happen:
Page loads the first time, the None radio button is checked / defaulted I go and select a different radiobutton in this radiobutton list I do an F5 refresh in my browser The None radio button is pre-selected again after it has come back from the refresh
but #4 is not happening. It's retaining the radiobutton that I selected in #2 and I don't know why. I mean in regular HTML it's stateless. So what could be holding this value? I want this to act like a normal input button.I know the question of "why not use an ASP.NET control" will come up. Well there are 2 reasons:
The stupid radiobuttonlist bug that everyone knows about I just want to brush up more on standard input tags.We are not moving to MVC so this is as close as I'll get and it's ok, because the rest of the team is on par with having mixed ASP.NET controls with standard HTML controls in our pages I'm surprised that it's retaining the change in selection after postback.
I am a new to regular expressions.I need to validate an identification number so that the textbox doesn't accept numbers like 1111111, 2222222, 3333333......9999999 and 1234567, 2345678, 3456789.Could someone please post regular expression for not accepting such format.
if there are two consecutive apostrophe or two consecutive hyphens or two consecutive comma or two consecutive spaces or two consecutive periods or two consecutive periods..I want to display those particular error.
and One more thing is if there are any of the above combinations like apostrophe+hyphen or apostrophe+space or hyphen+space, I want to throw that specific error.