that helped. i believe the example is incorrect on the forward slashes, however. should be "^[^\\?]*[\\?][^\\?]*$". having said that, i modified my original pattern to "^http:[^\?]*[\?][^\?]+$" and that worked.
thanks!
I want to use a regular expression to confirm if a URL that includes query parameters only includes a single ?. So far, I have a pattern of "^http.*?\?[^\?]+", which sort of works, but fails to apply to the entire match string. For example, with "http://somedomain.com?a=aaaaaaa&b=bbbbbbbbb"...
unfortunately i'm stuck with sql server 2000. the problem with the original approach is that i run the risk of getting duplicates. i'm not sure it's worthwhile to get into a full explanation of why i need to do what i want to do and how i've gotten to that place. however, a simplified...
i was hoping for a more automatic method based on max referenceCode. the above requires me to calculate for each subgroup (which maybe is the fastest method in the end), but there are probably 30 to 40 subgroups that need to be reincremented. also, not all the subgroups are sequential like...
i have a sql server 2000 database with a table that includes an identity primary key field. it also includes an int field called "referenceCode" . the "referenceCode" value is set by the application that uses the database and is incremented for new records under certain conditions.
due to a...
never mind. i figured it out. i was enclosing the individual strings in the array in quotes (due to spaces in some file names) and this was causing the "path" to get interpreted as a relative path, so the current directory was getting appended to the path resulting in the error.
i have an array of strings representing files to copy. each one needs to be copied to a central location. i have code like...
foreach ($file in $files)
{
write-host "copying $file";
copy-item -path $file -destination $targetFolder
}
the content for $file might look like...
found a solution.
$OFS = "`r"
$fileContent = get-content $codeFileName
$fileContent = [Regex]::Replace("/\*.*?\*/","")
$fileContent = $fileContent.Split("`r")
my understanding is that regex collapses the array of strings from get-content into a single string. by setting $OFS to insert a...
so i've basically got a code file with comments where i want to remove the comments using a regular expression. the comments are identified with /* and */, which can span multiple lines. the final solution from a prior post was to use:
[Regex]::Replace("/\*.*?\*/","")
unfortunately, the...
i tried that and it still didn't work. specifically...
$codeFile -replace "(?s)/\*.*?\*/",""
...where $codeFile contains the text of the file (using get-content), the comments still remain.
is it possible to use a regular expression to remove all comments from a code file? for example, if i have a file with:
here is some code
/* here
are some
comments */
here is some code
is there a way to specify a regexp pattern such that it will remove the comment. i wanted to do...
i wasn't able to get option 3 to work as presented. the scriptblock part wasn't working. however, i was able to use the -filepath and -argumentlist combination, for resulting code of...
$myscript = <line read from ini>
$mypar1 = <line read from ini>
$mypart2 = <line read from ini>
$j =...
i have a powershell script that runs some installation tasks. it also reads a config file that can contain references to other executables, batch files or powershell scripts to run. basically, the intent is to allow individual users to add additional functionality to the primary script through...
tsuji, that is exactly what i needed. using transformer.outputsettings, i'm able to specify HTML output and my closing tags are no longer getting collapsed.
i have an program where i'm extracting xml from comments in a vbs file and then i need to output an html file using an xsl file for the transformation. to that end, i have code of...
XslCompiledTransform transformer = new XslCompiledTransform();
transformer.Load(xslFile);
string xmlContent =...
if by implementation you're referring to the output method, then "html" as show in the original post. the tranformation is being run through a C# application, so perhaps there's an issue there. the basic code looks like...
XslCompiledTransform transformer = new XslCompiledTransform()...
dian,
yeah, i found a similar suggestion on another post. i ended up going with...
<script type="text/javascript" src="QTPFrameworkDocCode.js">
<xsl:text>
</xsl:text>
</script>
which preserves the closing tag.
thanks,
glenn
i'm using an xslt file to output an html file from an xml file. the output html file needs to include a link to a javascript file. to that end, the xslt file includes...
<xsl:output method="html" encoding="utf-16"/>
<xsl:template match="/">
<html>
<head>
<script...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.