Use regular expression to update text in MySQL fieldNotepad++ regular expression helpsed regex remove special...

What is this large pipe coming out of my roof?

Possible Leak In Concrete

Russian cases: A few examples, I'm really confused

Ban on all campaign finance?

Current sense amp + op-amp buffer + ADC: Measuring down to 0 with single supply

How is the Swiss post e-voting system supposed to work, and how was it wrong?

What are some nice/clever ways to introduce the tonic's dominant seventh chord?

Can elves maintain concentration in a trance?

Employee lack of ownership

Why does Deadpool say "You're welcome, Canada," after shooting Ryan Reynolds in the end credits?

I need to drive a 7/16" nut but am unsure how to use the socket I bought for my screwdriver

Replacing Windows 7 security updates with anti-virus?

2D counterpart of std::array in C++17

When do we add an hyphen (-) to a complex adjective word?

Make a transparent 448*448 image

Is it true that real estate prices mainly go up?

Is it normal that my co-workers at a fitness company criticize my food choices?

Bash: What does "masking return values" mean?

Making a sword in the stone, in a medieval world without magic

How to deal with taxi scam when on vacation?

Rules about breaking the rules. How do I do it well?

PlotLabels with equations not expressions

Unreachable code, but reachable with exception

How to write cleanly even if my character uses expletive language?



Use regular expression to update text in MySQL field


Notepad++ regular expression helpsed regex remove special charactersHow to represent m:n relationships in a form in Libre Office base?Use regular expression to look for “%”Microsoft Word wildcardsNotepad++ Regular Expression Assistancevalidate a mysql regular expressionExcel - power query (or anything else) - join on partial match between fields?Deleting all line breaks between two matching variables in notepad++Regular expression













2















I have a MySQL table with VARCHAR field description. Here's an example value in this field:



The quick brown fox jumps over the lazy dogThis is the second sentence.


I want to change the text so that there is a period and space between the two sentences. I think I can fix this with regex, but I don't know how to use the regex in SQL.



How can I use regex to update a field in MySQL?










share|improve this question
















bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • This is just in one field, the objective is to put a period and space between those two sentences. In the current example, the end of first sentence and the beginning of the second sentence have nothing in between to separate them dogThis.

    – agentmg123
    Jul 13 '17 at 14:46











  • I used VARCHAR for this description field. I want both sentences to be saved in the same field but I just want them to be separated with a period and a space. I have not used any SQL, I'm not even sure if it's possible to use SQL statements on this one. Do you know of any other solutions that I can use to crack it?

    – agentmg123
    Jul 13 '17 at 15:51











  • See this SQL i.imgur.com/SAc29ag.png that gives the expected result from the same field but I don't have time to build an UPDATE statement and make dynamic. I don't do a lot of SQL updates personally and use INSERT statements more but there may be better ways to do this with stored procs, passing arguments, return values, etc. but this was a quick test to confirm it is possible. Building the dynamic UPDATE statement isn't something I have time to work on right now, see if this is anything you can work with. But you will need: github.com/mysqludf/lib_mysqludf_preg/downloads

    – Pimp Juice IT
    Jul 15 '17 at 3:14











  • If you don't get enough attention here with this or this doesn't help you, consider asking a moderator to migrate over to stackoverflow.com as there are some really good MySQL query writers there that I've asked for help so many more SQL guys over there for sure. Don't cross-post though and ask for this to be migrated. I'm going to delete my answer since I misunderstood what you were trying to accomplish. See here for the lib_mysqludf_preg install instruction if you're running Windows OS as this helped me some with the error.

    – Pimp Juice IT
    Jul 15 '17 at 3:18
















2















I have a MySQL table with VARCHAR field description. Here's an example value in this field:



The quick brown fox jumps over the lazy dogThis is the second sentence.


I want to change the text so that there is a period and space between the two sentences. I think I can fix this with regex, but I don't know how to use the regex in SQL.



How can I use regex to update a field in MySQL?










share|improve this question
















bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • This is just in one field, the objective is to put a period and space between those two sentences. In the current example, the end of first sentence and the beginning of the second sentence have nothing in between to separate them dogThis.

    – agentmg123
    Jul 13 '17 at 14:46











  • I used VARCHAR for this description field. I want both sentences to be saved in the same field but I just want them to be separated with a period and a space. I have not used any SQL, I'm not even sure if it's possible to use SQL statements on this one. Do you know of any other solutions that I can use to crack it?

    – agentmg123
    Jul 13 '17 at 15:51











  • See this SQL i.imgur.com/SAc29ag.png that gives the expected result from the same field but I don't have time to build an UPDATE statement and make dynamic. I don't do a lot of SQL updates personally and use INSERT statements more but there may be better ways to do this with stored procs, passing arguments, return values, etc. but this was a quick test to confirm it is possible. Building the dynamic UPDATE statement isn't something I have time to work on right now, see if this is anything you can work with. But you will need: github.com/mysqludf/lib_mysqludf_preg/downloads

    – Pimp Juice IT
    Jul 15 '17 at 3:14











  • If you don't get enough attention here with this or this doesn't help you, consider asking a moderator to migrate over to stackoverflow.com as there are some really good MySQL query writers there that I've asked for help so many more SQL guys over there for sure. Don't cross-post though and ask for this to be migrated. I'm going to delete my answer since I misunderstood what you were trying to accomplish. See here for the lib_mysqludf_preg install instruction if you're running Windows OS as this helped me some with the error.

    – Pimp Juice IT
    Jul 15 '17 at 3:18














2












2








2








I have a MySQL table with VARCHAR field description. Here's an example value in this field:



The quick brown fox jumps over the lazy dogThis is the second sentence.


I want to change the text so that there is a period and space between the two sentences. I think I can fix this with regex, but I don't know how to use the regex in SQL.



How can I use regex to update a field in MySQL?










share|improve this question
















I have a MySQL table with VARCHAR field description. Here's an example value in this field:



The quick brown fox jumps over the lazy dogThis is the second sentence.


I want to change the text so that there is a period and space between the two sentences. I think I can fix this with regex, but I don't know how to use the regex in SQL.



How can I use regex to update a field in MySQL?







mysql regex sql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 13 '17 at 17:33









Excellll

11.2k74164




11.2k74164










asked Jul 12 '17 at 18:04









agentmg123agentmg123

112




112





bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 12 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • This is just in one field, the objective is to put a period and space between those two sentences. In the current example, the end of first sentence and the beginning of the second sentence have nothing in between to separate them dogThis.

    – agentmg123
    Jul 13 '17 at 14:46











  • I used VARCHAR for this description field. I want both sentences to be saved in the same field but I just want them to be separated with a period and a space. I have not used any SQL, I'm not even sure if it's possible to use SQL statements on this one. Do you know of any other solutions that I can use to crack it?

    – agentmg123
    Jul 13 '17 at 15:51











  • See this SQL i.imgur.com/SAc29ag.png that gives the expected result from the same field but I don't have time to build an UPDATE statement and make dynamic. I don't do a lot of SQL updates personally and use INSERT statements more but there may be better ways to do this with stored procs, passing arguments, return values, etc. but this was a quick test to confirm it is possible. Building the dynamic UPDATE statement isn't something I have time to work on right now, see if this is anything you can work with. But you will need: github.com/mysqludf/lib_mysqludf_preg/downloads

    – Pimp Juice IT
    Jul 15 '17 at 3:14











  • If you don't get enough attention here with this or this doesn't help you, consider asking a moderator to migrate over to stackoverflow.com as there are some really good MySQL query writers there that I've asked for help so many more SQL guys over there for sure. Don't cross-post though and ask for this to be migrated. I'm going to delete my answer since I misunderstood what you were trying to accomplish. See here for the lib_mysqludf_preg install instruction if you're running Windows OS as this helped me some with the error.

    – Pimp Juice IT
    Jul 15 '17 at 3:18



















  • This is just in one field, the objective is to put a period and space between those two sentences. In the current example, the end of first sentence and the beginning of the second sentence have nothing in between to separate them dogThis.

    – agentmg123
    Jul 13 '17 at 14:46











  • I used VARCHAR for this description field. I want both sentences to be saved in the same field but I just want them to be separated with a period and a space. I have not used any SQL, I'm not even sure if it's possible to use SQL statements on this one. Do you know of any other solutions that I can use to crack it?

    – agentmg123
    Jul 13 '17 at 15:51











  • See this SQL i.imgur.com/SAc29ag.png that gives the expected result from the same field but I don't have time to build an UPDATE statement and make dynamic. I don't do a lot of SQL updates personally and use INSERT statements more but there may be better ways to do this with stored procs, passing arguments, return values, etc. but this was a quick test to confirm it is possible. Building the dynamic UPDATE statement isn't something I have time to work on right now, see if this is anything you can work with. But you will need: github.com/mysqludf/lib_mysqludf_preg/downloads

    – Pimp Juice IT
    Jul 15 '17 at 3:14











  • If you don't get enough attention here with this or this doesn't help you, consider asking a moderator to migrate over to stackoverflow.com as there are some really good MySQL query writers there that I've asked for help so many more SQL guys over there for sure. Don't cross-post though and ask for this to be migrated. I'm going to delete my answer since I misunderstood what you were trying to accomplish. See here for the lib_mysqludf_preg install instruction if you're running Windows OS as this helped me some with the error.

    – Pimp Juice IT
    Jul 15 '17 at 3:18

















This is just in one field, the objective is to put a period and space between those two sentences. In the current example, the end of first sentence and the beginning of the second sentence have nothing in between to separate them dogThis.

– agentmg123
Jul 13 '17 at 14:46





This is just in one field, the objective is to put a period and space between those two sentences. In the current example, the end of first sentence and the beginning of the second sentence have nothing in between to separate them dogThis.

– agentmg123
Jul 13 '17 at 14:46













I used VARCHAR for this description field. I want both sentences to be saved in the same field but I just want them to be separated with a period and a space. I have not used any SQL, I'm not even sure if it's possible to use SQL statements on this one. Do you know of any other solutions that I can use to crack it?

– agentmg123
Jul 13 '17 at 15:51





I used VARCHAR for this description field. I want both sentences to be saved in the same field but I just want them to be separated with a period and a space. I have not used any SQL, I'm not even sure if it's possible to use SQL statements on this one. Do you know of any other solutions that I can use to crack it?

– agentmg123
Jul 13 '17 at 15:51













See this SQL i.imgur.com/SAc29ag.png that gives the expected result from the same field but I don't have time to build an UPDATE statement and make dynamic. I don't do a lot of SQL updates personally and use INSERT statements more but there may be better ways to do this with stored procs, passing arguments, return values, etc. but this was a quick test to confirm it is possible. Building the dynamic UPDATE statement isn't something I have time to work on right now, see if this is anything you can work with. But you will need: github.com/mysqludf/lib_mysqludf_preg/downloads

– Pimp Juice IT
Jul 15 '17 at 3:14





See this SQL i.imgur.com/SAc29ag.png that gives the expected result from the same field but I don't have time to build an UPDATE statement and make dynamic. I don't do a lot of SQL updates personally and use INSERT statements more but there may be better ways to do this with stored procs, passing arguments, return values, etc. but this was a quick test to confirm it is possible. Building the dynamic UPDATE statement isn't something I have time to work on right now, see if this is anything you can work with. But you will need: github.com/mysqludf/lib_mysqludf_preg/downloads

– Pimp Juice IT
Jul 15 '17 at 3:14













If you don't get enough attention here with this or this doesn't help you, consider asking a moderator to migrate over to stackoverflow.com as there are some really good MySQL query writers there that I've asked for help so many more SQL guys over there for sure. Don't cross-post though and ask for this to be migrated. I'm going to delete my answer since I misunderstood what you were trying to accomplish. See here for the lib_mysqludf_preg install instruction if you're running Windows OS as this helped me some with the error.

– Pimp Juice IT
Jul 15 '17 at 3:18





If you don't get enough attention here with this or this doesn't help you, consider asking a moderator to migrate over to stackoverflow.com as there are some really good MySQL query writers there that I've asked for help so many more SQL guys over there for sure. Don't cross-post though and ask for this to be migrated. I'm going to delete my answer since I misunderstood what you were trying to accomplish. See here for the lib_mysqludf_preg install instruction if you're running Windows OS as this helped me some with the error.

– Pimp Juice IT
Jul 15 '17 at 3:18










1 Answer
1






active

oldest

votes


















0














This question has been answered on StackOverflow (https://stackoverflow.com/a/986870/2992519):




No.



But if you have access to your server, you could use a user defined
function (UDF) like mysql-udf-regexp.







share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1229244%2fuse-regular-expression-to-update-text-in-mysql-field%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    This question has been answered on StackOverflow (https://stackoverflow.com/a/986870/2992519):




    No.



    But if you have access to your server, you could use a user defined
    function (UDF) like mysql-udf-regexp.







    share|improve this answer




























      0














      This question has been answered on StackOverflow (https://stackoverflow.com/a/986870/2992519):




      No.



      But if you have access to your server, you could use a user defined
      function (UDF) like mysql-udf-regexp.







      share|improve this answer


























        0












        0








        0







        This question has been answered on StackOverflow (https://stackoverflow.com/a/986870/2992519):




        No.



        But if you have access to your server, you could use a user defined
        function (UDF) like mysql-udf-regexp.







        share|improve this answer













        This question has been answered on StackOverflow (https://stackoverflow.com/a/986870/2992519):




        No.



        But if you have access to your server, you could use a user defined
        function (UDF) like mysql-udf-regexp.








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jul 12 '17 at 18:09









        mtakmtak

        11.2k23353




        11.2k23353






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1229244%2fuse-regular-expression-to-update-text-in-mysql-field%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...

            Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

            VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...