Hi all,
In my database (SQL 2005) I have a field which holds a comment but in the comment I have an id and I would like to strip out just the id, and IF possible convert it to an int:
'activation successful of id 1010101'
The line above is the exact structure of the data in the db field.
And no I don't want to do this in the code of ...
In my webpage, I want the website to greet the user, but the username is surrounded by 'single quotations'. Since this isn't to prevent MySQL injection, i just want to remove quotes around my name on the display page.
Ex: Welcome 'user'!
I'm trying to find the way where i can strip the quotations around the user and have it display on t...
Hello,
I am trying to use the following code, which I have not been able to test yet, because I get the following errors:
#!/usr/bin/perl
use warnings;
use strict;
use Text::Wrap;
use Mail::Box::Manager;
use HTML::Obliterate qw(extirpate_html);
open (MYFILE, '>>data.txt');
binmode(MYFILE, ':encoding(UTF-8)');
my $file = shift || $E...
I've encountered the need to remove comments of the form:
<!-- Foo
Bar -->
I'd like to use a regular expression that matches anything (including line breaks) between the beginning and end 'delimiters.'
What would a good regex be for this task?
...
Whats the best way to remove comments from a PHP file?
I want to do something similar to strip-whitespace() - but it shouldn't remove the line breaks as well.
EG:
I want this:
<?PHP
// something
if ($whatsit) {
do_something(); # we do something here
echo '<html>Some embedded HTML</html>';
}
/* another long
comment
*/
some_mo...
Hi, problem:
How do I strip all attributes from HTML tags in a string, except "alt" and "src" using Java?
And further.. how do I get the content from all "src" attributes in the string?
:)
...
Hello,
In my program, it gets MP4 video in, and I want it to output a MP3 (without any server-side stuff.) Since Android (and my app) needs to run on many different hardware configurations, this means I probably cannot use FFMPEG :(
I know this may be very battery and processing power intensive, especially for a mobile phone, but I need ...
What are the settings in Xcode to strip symbols for an iphone application?
I use these settings in Xcode but still see classnames and their methods in
the executable using a binary file editor.
Deployment:
1) Deployment Postprocessing (checked)
2) Strip Debug Symbols During Copy (checked)
3) Strip Linked Product (checked)
4) Use Separ...
Hi all,
Is there a fast way (without having to explicitly looping through each character in a string) and either stripping or keeping it. In Visual FoxPro, there is a function CHRTRAN() that does it great. Its on a 1:1 character replacement, but if no character in the alternate position, its stripped from the final string. Ex
CHRTRA...
I have a context menu strip with 8 items and two separators. When the user brings up the context menu strip, then hits the arrow key to scroll through the items, hitting the eighth item causes the menu to 'scroll' up, leaving blank space at the bottom. Is there any way to prevent that behaviour?
...
Hi,
So I'm quite new to programming in general, so this may be a stupid question, but I am specifically trying to use regexes to strip a CSS tag. Basically I have this:
.style1 {
font-size: 24px;
font-weight: bold;
color: #FFEFA1;
}
and I want it to look like this:
.style1:color:#FFEFA1
I want to maintain the s...
I'm currently using PHP and a regular expression to strip out all HTML comments from a page. The script works well... a little too well. It strips out all comments including my conditional comments in the . Here's what I've got:
<?php
function callback($buffer)
{
return preg_replace('/<!--(.|\s)*?-->/', '', $buffer);
}
...
Is there anyway easier than this to strip HTML from a string using Perl?
$Error_Msg =~ s|<b>||ig;
$Error_Msg =~ s|</b>||ig;
$Error_Msg =~ s|<h1>||ig;
$Error_Msg =~ s|</h1>||ig;
$Error_Msg =~ s|<br>||ig;
I would appreicate both a slimmed down regular expression, e.g. something like this:
$Error_Msg =~ s|</?[b|h1|br]>||ig;
Is there a...
I want to be able to strip off a header from a wav file.
Is there any way to do this in C#?
...
Hi everyone, I was just wondering if any one knew a function to remove ALL classes from a string in php.. Basically I only want
<p>
tags rather than
<p class="...">
If that makes sense :)
...
I'm working on a specialized HTML stripper. The current stripper replaces <td> tags with tabs then <p> and <div> tags with double carriage-returns. However, when stripping code like this:
<td>First Text</td><td style="background:#330000"><p style="color:#660000;text-align:center">Some Text</p></td>
It (obviously) produces
First Tex...
Hi all,
I would like to strip everything in a string before a - and leave what's after that. For example:
15.11-101
I want to strip 15.11 and leave 101. I've tried a few different things, but can't seem to get it working, if anyone could help me out, that'd be fantastic :)
Cheers
Leanne
...
I have two string that i want to limit to lets say the first 25 characters for example. Is there a way to cut off text after the 25th character and add a ... to the end of the string?
So '12345678901234567890abcdefg'
would turn into '12345678901234567890abcde...' where 'fg' is cut off.
...
Umbraco is taking:
<img alt="Your Title - for example Mr., Mrs., Ms."
src="../media/21283/q16x16.gif" width="16" height="15"/>
And turning it into
<img alt="" src="/media/21283/q16x16.gif" width="16" height="15" rel="16,15"/>
If I alter the alt tag after this processing then the alt tag is saved.
...
Hi,
I wonder what is the difference between these two:
gcc -s: Remove all symbol table and relocation information from the executable.
strip: Discard symbols from object files.
Are they having the same meaning? Which one do you use to reduce the size of executable and speed up its running. Really appreciate your detail info.
Thanks...