Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9281205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T18:03:35+00:00 2026-06-18T18:03:35+00:00

In PHPStorm, I need to find/replace some mixed case strings which are used for

  • 0

In PHPStorm, I need to find/replace some mixed case strings which are used for CSS class names and for the DOM id’s. I can’t change attributes like onClick and image names need to remain. Here is what I have:

<div class="ThumbContainer" id="Source-Data4-Thumb">
<div class="ThumbTitleArea">
    <div class="DataTitleDiv"> GYR Performance <img src="images/someImage.png" onClick="someFunc()" /></div>
</div>
    <div class="dataDetailArea">
    <div class="DataThumbArea"> Data Source:Client<br>
                    Last refreshed:12/05/2013 <br>
                    Records:206<br>
        <br>
                        Used for the following reports<br>
                -    GYR Performance<br>
        </div>
</div>
</div>

Here is what I need:

<div class="thumb_container" id="source_data4_thumb">
<div class="thumb_title_area">
    <div class="data_title_div"> GYR Performance <img src="images/someImage.png" onClick="someFunc()" /></div>
</div>
    <div class="data_detail_area">
    <div class="data_thumb_area"> Data Source:Client<br>
                      Last refreshed:12/05/2013 <br>
                      Records:206<br>
        <br>
                          Used for the following reports<br>
                 -    GYR Performance<br>
        </div>
</div>
</div>

Notice the dataDetailArea starts with a lowercase.. bleh. This will be a one-time find/replace so it doesn’t need to be in PHPStorm. It can be in any online tool even, like http://gskinner.com/RegExr/

The actual backbone template I need to find/replace on is about 3100 lines of code, otherwise I’d provide it all here for you.

Here’s what I have so far. It seems to not match match the Camel-Case3-Foo:

(class|id|data-[?!=])="\b([A-Za-z][a-z-]*){2,}\b"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T18:03:36+00:00Added an answer on June 18, 2026 at 6:03 pm

    This regex should find the locations where underscores should be placed:

    ((?<=\w)(?=[A-Z])|-)
    

    It would seem to make sense to do a replacement with this to insert the underscores, then convert the string to lower case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

New to phpstorm, I can't find the class browser (OSX). Where is it? Regards,
I can't find the ability of phpStorm 5 to avoid indexing a specific folder.
How can I enable word wrapping in PhpStorm? I need to enable it only
I need help setting up phpstorm (4.0) with XAMPP which is at the default
I'm using JetBrains PhpStorm, which is probably the most epic IDE I've ever used.
I have used PHPStorm frequently to download files locally with the use of FTP,
I have a project in PHPStorm, which contains a few libraries (Zend, Doctrine, ...)
I use phpstorm to develop websites, but for some reason breakpoints aren't synchronized. Here
I was hoping to add some custom auto-completion to phpStorm for Laravel Blade views,
How to make phpstorm display line numbers by default? Couldn't find that option. It's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.