Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. gacaccia

    Regular expression to match a single occurance of a ?

    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!
  2. gacaccia

    Regular expression to match a single occurance of a ?

    Yeah, doing standard character counts isn't ideal because I will want to be checking other patterns in addition to the single ?.
  3. gacaccia

    Regular expression to match a single occurance of a ?

    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"...
  4. gacaccia

    how to increment a int column using UPDATE

    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...
  5. gacaccia

    how to increment a int column using UPDATE

    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...
  6. gacaccia

    how to increment a int column using UPDATE

    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...
  7. gacaccia

    strange copy-item behavior

    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.
  8. gacaccia

    strange copy-item behavior

    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...
  9. gacaccia

    Regex and multiline replacement pattern, take 2

    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...
  10. gacaccia

    Regex and multiline replacement pattern, take 2

    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...
  11. gacaccia

    regexp and multiline replace pattern

    thanks, that did it.
  12. gacaccia

    regexp and multiline replace pattern

    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.
  13. gacaccia

    regexp and multiline replace pattern

    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...
  14. gacaccia

    how to get powershell script to execute other scripts

    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 =...
  15. gacaccia

    how to get powershell script to execute other scripts

    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...
  16. gacaccia

    how to specify output method for xmlwriter

    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.
  17. gacaccia

    how to specify output method for xmlwriter

    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 =...
  18. gacaccia

    how to prevent &lt;script&gt;&lt;/script&gt; from collapsing to &lt;script /&gt;

    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()...
  19. gacaccia

    how to prevent &lt;script&gt;&lt;/script&gt; from collapsing to &lt;script /&gt;

    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
  20. gacaccia

    how to prevent &lt;script&gt;&lt;/script&gt; from collapsing to &lt;script /&gt;

    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...

Part and Inventory Search

Back
Top