| Validating and extracting filenames (11 replies) |
| ASPFriends.com 'aspngregexp' list |
| I want to provide a facility for users to upload .gif, .jpeg, .jpg and bmp images to a site and then to extract the file name from a full path (e.g. C:\temp\image.gif). I need a regular expression to validate that the user has selected an suitable image to upload and that the path to it is a valid file path. Anyone here willing to provide some pointers? Cheers, Julian Voelcker The Virtual World (U... |
|
| Splitting items in a text box (4 replies) |
| ASPFriends.com 'aspngregexp' list |
| I want to split items in a multiline textbox, using the newline (\n) as the separator. So the following is in a text box: "John" "Paul" "George" "Ringo" which should be separated into the array: {"John", "Paul", "George", "Ringo"} Instead I am getting: {"John", "", "Paul", "", "George", "", "Ringo"} In other words, the carriage return is being outputted in the output array. I am using the followin... |
|
| Regex & Match (2 replies) |
| ASPFriends.com 'aspngregexp' list |
| Hi All, When i use Regex & Match classes ,i get an occurrence per line. If i have two occurrences , i can not get another occurrence. What is your suggestion to this problem. Thanks Askar Do You Yahoo!? Yahoo! Autos Get free new car price quotes |
|
| Expression for "Allow only numbers" (3 replies) |
| ASPFriends.com 'aspngregexp' list |
| What would the expression be (for use in the RegExpressionValidator in ASP.NET) for "Allow only numbers or nothing at all") 20 Thanks in advance, Ian |
|
| Domain Name Reg Ex (2 replies) |
| ASPFriends.com 'aspngregexp' list |
| I need help with a Rex Ex that will check domain names. Right now I have: ^[a zA Z0 9\ \.] \.(com|edu|net|gov|org)$ but this does not catch " domain.com" I tried: ^[a zA Z0 9] [a zA Z0 9\ \.]?\.(com|edu|net|gov|org)$ but it does not seem to work properly. Any ideas? Thanks, Stewart Haddock |
|
| ASPN Reg Expressions (5 replies) |
| ASPFriends.com 'aspngregexp' list |
| Usually you search for an occurance of a specific word or regexp and then replace it with something else. I wish to search for a NOT occurance of a word and then do something. I thought [^word] is what you use, is this correct. For example : objRegExp.Pattern " a href http://([^localhost])//(.*?) " strResult objRegExp.Replace (text," a href //test/$2 ") For all occurances of NOT localhost I want t... |
|
| replacing \n (2 replies) |
| ASPFriends.com 'aspngregexp' list |
| hi all, Does anyone know the RegEx that would replace all instances of \n where there ISN'T a \r\n ? Basically I want to make sure every \n is actually \r\n, but I need to make sure I don't end up with \r\n\n. Make sense? Thanks, Dave |
|
| Regular Expression madness (5 replies) |
| ASPFriends.com 'aspngregexp' list |
| Moved from [aspngfreeforall] to [aspngregexp] by Tim Musschoot Tim.musschoot@rug.ac.be I'm going bananas here ... can someone tell me why this search isn't working? Regex: \[H1]. ?\[/H1] Text: [H1]This is a header[/H1][H1]Also a header[/H1] I'm trying to get 2 hits containing each of the 'tags'. Help?! ******************************************************************** Visit our Internet site at ... |
|