+ Reply to Thread
Results 1 to 6 of 6

How to Delete Such Characters?

  1. #1
    Registered User
    Join Date
    08-05-2021
    Location
    London, England
    MS-Off Ver
    2019
    Posts
    4

    Post How to Delete Such Characters?

    I would like to delete the characters at the end of the lines, but they have different lengths, thus it's impossible to delete by position.
    As you can see, the main lines are within "_", the rest is garbage. I can't figure out a way to get rid of the ending characters.

    Events/Stingers/GSB_Stn/Observer/Metal/Play_accent_metal_cm111_impact_massive_bonebreakerY!/
    Events/Stingers/GSB_Stn/Observer/Metal/Play_accent_metal_cm113_impact_massive_giant_roller`iA^!/
    Events/Stingers/GSB_Stn/Observer/Metal/Play_accent_metal_cm125_impact_massive_black_pulse4[1]z!/
    Events/Stingers/GSB_Stn/Observer/Metal/Play_accent_metal_cm126_impact_massive_high_thingi\"/
    Events/Stingers/GSB_Stn/Blairwitch/Whoosh/Tonal/Play_Accent_PTSD_Breath_RiserWhoosh_Tonal_HelicopterEnd_01y*!/
    Events/Stingers/GSB_Stn/Blairwitch/Whoosh/Tonal/Play_Accent_PTSD_Breath_RiserWhoosh_Tonal_HelicopterEnd_02*`[1]!/
    Events/Stingers/GSB_Stn/Blairwitch/Whoosh/Tonal/Play_Accent_PTSD_Breath_RiserWhoosh_Tonal_HelicopterEnd_03e"/
    Events/Stingers/GSB_Stn/Blairwitch/Whoosh/Tonal/Play_Accent_RiserWhoosh_Tonal_MetalResonant_01[1]E!/
    Events/Stingers/GSB_Stn/Blairwitch/Whoosh/Tonal/Play_Accent_RiserWhoosh_Tonal_MetalResonant_02\!/
    Events/Stingers/GSB_Stn/Blairwitch/Whoosh/Tonal/Play_Accent_RiserWhoosh_Tonal_MetalResonant_03ɉ!/
    Events/Stingers/GSB_Stn/Blairwitch/Whoosh/Tonal/Play_Accent_RiserWhoosh_Tonal_TailReverb_Longq!/
    Events/Stingers/GSB_Stn/Blairwitch/Whoosh/Tonal/Play_Accent_RiserWhoosh_Tonal_TailReverb_Medium_02!/
    Events/Stingers/GSB_Stn/Blairwitch/Whoosh/Tonal/Play_Accent_RiserWhoosh_Tonal_TailReverb_Shortd!/
    Events/Stingers/GSB_Stn/Observer/Rise/Play_rise_0101Й!/

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.95 for Mac MS 365
    Posts
    8,684

    Re: How to Delete Such Characters?

    you have several "_" within each string, which parts are the "garbage" that you want removed?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    08-05-2021
    Location
    London, England
    MS-Off Ver
    2019
    Posts
    4

    Re: How to Delete Such Characters?

    The characters at the very ending: "d!/" "y*!/" "q!/" etc.
    If there was at least a space I could split the cells and delete them, but many are stuck with the last word which makes it impossible.

  4. #4
    Registered User
    Join Date
    08-05-2021
    Location
    London, England
    MS-Off Ver
    2019
    Posts
    4

    Re: How to Delete Such Characters?

    Maybe filtering only English words and delete symbols (except "/" and "_" would work).

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,175

    Re: How to Delete Such Characters?

    Try this
    PHP Code: 
    Public Function DeleteCharacter(ByVal s As String) As String
    Dim i 
    As Long
    Trim(s)
    For 
    1 To Len(s)
        If 
    Mid(si1Like "[a-zA-Z0-9/_]" False Then
            DeleteCharacter 
    Left(s1)
            Exit For
        
    End If
    Next i
    End 
    Function 
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-05-2021
    Location
    London, England
    MS-Off Ver
    2019
    Posts
    4

    Re: How to Delete Such Characters?

    I can't understand how to make it work.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to delete the two last characters if its an *+?
    By dewonw in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-06-2016, 04:19 PM
  2. [SOLVED] Macro to delete characters between 2 characters.
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-29-2014, 08:48 AM
  3. [SOLVED] Delete first 2 characters characters
    By jhalsall80 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-30-2014, 11:36 AM
  4. how to delete characters before and after
    By moomeacow in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2014, 04:28 PM
  5. [SOLVED] Delete characters and add * in front and last characters in ACCESS QUERY
    By LALTIZER in forum Access Tables & Databases
    Replies: 9
    Last Post: 02-01-2013, 02:06 PM
  6. Delete some characters
    By Anto_BT in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-20-2012, 11:44 AM
  7. [SOLVED] Characters.delete only works with less than 255 characters?
    By mexindian in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-26-2012, 11:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1