Forum Discussion

MathijsSerlie's avatar
MathijsSerlie
Copper Contributor
Aug 07, 2025

Help Needed: Trouble Filtering and Re-Entering Data

Hi everyone,

I'm looking for some help. I've started working on something quite simple, but I can't get it to function correctly. Yep, total noob moment.

The concept is straightforward, and I've attached what I’ve started so far.

The idea is to paste multi-line text into a text field.

For example:

[12:29] 1g Name Bundle sib 03 03F : 1g Name Bundle sib 03 03F

Gender: Female

Coat: Black Walker

Eye: Garnet

Mane: Long

Tail: Long

Coat Gloom

Hair Gloom

Skull Branding

Wing Style: Pegasus

Wing Color: Nightfall

bae515d4-1caa-cda5-c259-b2d436f3ba19

 

Here’s what I’m trying to achieve:

  • The first line ([12:29] ...) should be filtered out.
  • The name should be extracted: 1g Name Bundle sib 03 03F
  • The UUID (last line) must be unique—no duplicate entries allowed.

If the entry has already been added (based on the UUID), it shouldn't be accepted again.

However, if the input is deleted, it should be possible to re-enter it, but currently, it still says the data has already been entered, even after deletion.

Could someone please check and help me figure out what’s going wrong?

Thanks in advance!

9 Replies

  • peiyezhu's avatar
    peiyezhu
    Bronze Contributor

     

    Re:

    • The UUID (last line) must be unique—no duplicate entries allowed.

    $query = "
    CREATE TABLE IF NOT EXISTS myList (
        id INTEGER PRIMARY KEY AUTOINCREMENT,
        Name TEXT NOT NULL,
        UUID TEXT NOT NULL UNIQUE
    );
    ";

    DDL key words unique.

    Re:

    The idea is to paste multi-line text into a text field.

    regular expression.

     

    var text = document.getElementById('inputText').value;

     

                var nameRegex = /(\d+g Name Bundle sib \d+ \d+[A-Z]*)/;

                var uuidRegex = /([a-f0-9-]{36})/;

     

                var nameMatch = text.match(nameRegex);

                var uuidMatch = text.match(uuidRegex);

     

     

     

     

     

    • MathijsSerlie's avatar
      MathijsSerlie
      Copper Contributor

      Hi Karl,

      I try it again, my last reply didn't go trough.

      attached you find what i managed to do myself.
      I check for duplicates using UUID.

      attachment is not working, try pictures

       

    • MathijsSerlie's avatar
      MathijsSerlie
      Copper Contributor

      Hi Karl,

      Sorry if you get this reply more than once, I’m not sure if I’m doing something wrong.

      I check for duplicates with uuid. Tried to upload what I’ve made so far, but it wouldn’t let me.

      Mathijs

      https://gyazo.com/f6f789fa6e8b8ad26041fba473153fd0

      https://gyazo.com/8b608f520274c41c1f49c27449bc3bad

      https://gyazo.com/c069be3f68584b67349e32d490e2448e

    • MathijsSerlie's avatar
      MathijsSerlie
      Copper Contributor

      Hi Karl,

      Sorry if you get this reply more than once, I’m not sure if I’m doing something wrong.

      I check for duplicates with uuid. Tried to upload what I’ve made so far, but it wouldn’t let me.

      Mathijs

Resources