Q:

How can I preg_replace a tag in the title on WordPress? 

I am attempting to locate ANY of the post TAGS in the POST TITLE and preg_replace the match with the tag surrounded by a span to add css (bold) to it.   The end result should be the post title with any tags bolded. 
        <h2 class="entry-title">
            <a href="<?php the_permalink(); ? >" rel="bookmark" title="Permalink to <? php the_title(); ? >">
                <? php 
                    $titlename = the_title();
                    $tags = array(just_tags());
                    foreach($tags as $tag) {
                        $displaytitle = preg_replace("$tag", "<span class=\"larger\">$tag</span>", $titlename);
                    }
                    echo $displaytitle;
                ? >
            </a>
        </h2>

As you can see in the code, I modified a few functions to attempt to get just the tags, no $before and $after. 
function get_just_the_tag_list() {
    return get_the_term_list('post_tag');
}

function just_tags() {
    echo get_just_the_tag_list();
}

A:

Your preg_replace is looking for the text "$tag" in $titlename.  Take it out of quotation marks, or wrap it in curly braces "{$tag}"! 
get_the_terms_list returns an HTML formatted list of terms.  You want to use get_the_terms, and that is automatically returned as an array, so $tags should be defined like so (assuming this is in the loop and $post is accurate:
$tags = get_the_terms($post->ID, 'post-tags');
<h2 class="entry-title">
        <a href="<?php the_permalink(); ? >" rel="bookmark" title="Permalink to <? php the_title(); ? >">
            <? php 
                $titlename = get_the_title();
                $tags = get_the_terms($post->ID, 'post_tag');
                foreach($tags as $tag) {
                    $titlename = str_replace($tag->name, '<span class="larger">'.$tag->name. '</span>', $titlename);
                }
                echo $titlename;
            ? >
        </a>
    </h2>

This means that your $displaytitle is being completely rewritten for each $tag, and if the last $tag isn't found in the post title, nothing will change.