Tagged Questions
1
vote
0answers
57 views
Correcting regex patterns across languages
I found this regex pattern at http://gskinner.com/RegExr/
,(?=(?:[^"]*"[^"]*")*(?![^"]*"))
Which is for pattern matching CSV delimited values (more specifically, the separating commas, which can be ...
1
vote
0answers
119 views
I need the Regular Expression For Replacing Characters in a SQL Statement
I am trying to match the BETWEEN RANGE on this SQL Statement as found below:
( WAEXD8 BETWEEN &WAEXD8 AND &WAEXD8 )
The above SQL Statement works with a DBS Data-source and while ...
1
vote
0answers
92 views
Effective way to search error handling bugs (regexes, parsers)
I'd like to search over thousands of files of c# code, for some evil places, where exceptions are possibly taken under the cover or at least not logged. I need regex expression which is able to find ...
1
vote
0answers
48 views
Replace non-decimal in KeyUp
Thanks to Joey in this question Remove non-digits, non-decimals, repeating decimals. I have a Regex.Replace, that looks like this
Regex.Replace(Txt, "[^-?\d+\.]|(?<=\.[^.]*)\.", "");
But now I ...
1
vote
0answers
42 views
RestRoute that allows periods in id and accepts result format
I have a heavily used REST service based on asp.net mvc. One of the resources is for users where you specify a given user with a route like this:
.../User/{id}.{format}
Ex:
...
0
votes
0answers
59 views
Regex to parse a string and match a URL or folder path
I'm trying to change a regex that will match a url like http://www.google.com, and also allow it to match a folder name such as j:\Folder\Name\Here
I'm parsing the text of a message for any links ...
0
votes
0answers
62 views
Regex not matching as expected
I don't know why this code is not executing the nested foreach loop.
public DataTable GetPNR(List<string> Request)
{
dt.Columns.Add("PNR", typeof(string));
foreach (string ...
0
votes
0answers
77 views
Changing numbers with Replace
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ...
0
votes
0answers
81 views
Why is this regex inserting the tag?
I have the following function being called from the MSSQL CLR:
private static string ReplaceTags(string input, string TagsReplacementXML)
{
const string TagNamePattern = @"<\$\w+>";
...
0
votes
0answers
46 views
Regex matching sentenses
I want to be able to match sentence to a single result as an example
\w+
something
\w+ else
something \w+
so when i say "nothing" it will only list the first entry since that is a wildcard.
for ...
0
votes
0answers
81 views
Output value with System.Diagnostic.Debug.WriteLine()
I'm trying to find the value in this line of code:-
var import = match.Groups[1].Value;
in this method of my LessTransform.cs class
private static string ResolveImports(FileInfo file)
{
...
0
votes
0answers
175 views
Pass HTML checkbox in DataTable to HTML table
I am loading the rows of a DataTable from a list. Im trying to create an HTML checkbox in each row of the first column. Following loading of the DataTable (example provided in Portion 1), I convert ...
0
votes
0answers
99 views
Regex - Remove HTML Markup, without some of the tags
I have the following HTML markup:
<div class="someClass">
<h1>This is the title</h1>
<p>Some text</p>
<p>Some more text</p>
</div>
I need ...
0
votes
0answers
82 views
Regex.IsMatch matches multiple results
I have two files with names:
abc_2013-01-01_2013-02-01_remote-987123_local-13809
bcd_2013-02-02_2013-03-01__remote-192.168.10.1_local-127.0.0.1
I want to split the file name and insert ...
0
votes
0answers
94 views
Uri.UnescapeDataString fails on different computer
On my dev computer everything was working fine and dandy but when I tested the program on a different Windows7 computer I was getting a System.UriFormatException: Invalid URI: There is an invalid ...