Gossamer Forum
Home : Products : DBMan : Discussions :

Regular Expression question

Quote Reply
Regular Expression question
Well, well...dbman is 10+ years old? I think I've been quietly running it on various site for almost that long. Good little program.

I see some familiar names....still helping people out, good work ladies.

Anyhow, getting to my question....I had to come back today to get some info on regular expressions so I could change the parameters on a two part search I've been doing with dbman. Found a great explanation from J P Deni from 10 years ago.

Her info was correct and clearly stated as always. My problem is this....I'm trying to using the ^ symbol to tighten up my search, but on the same page where I return my results I use the following for output to the user:

<b>$db_total_hits</b> comment(s) on <b>$search_terms</b>

When I use the ^ it gets returned in the search term string, so the user sees:

3 comment(s) on ^baseball

How do I stop the ^ from showing up? I am using re=on in the original search string and it does seem to be working properly.

thanks Steven
Quote Reply
Re: [steven99] Regular Expression question In reply to
i'm not an expert on regexp, but it seems in the html_view_success, above the print statement, you could say:

$search_string =~ s/\^//g;


$search_string =~ s/^//g;

not sure if the backslash is needed before the ^