cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-5019%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EW%C3%A4hlen%20Sie%20Text%20zwischen%20Trennzeichen%20aus%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-5019%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CP%3EHallo%2C%20ich%20versuche%20eine%20Formel%20zu%20schreiben%2C%20um%20Text%20auszuw%C3%A4hlen%2C%20der%20zwischen%20den%20Trennzeichen%20%5B%20%5D%20liegt.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EDer%20gesamte%20Text%20in%20meiner%20Spalte%20sieht%20wie%20folgt%20aus%3A%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ERinseAid%5BApex.Rinse%5D*(Temp-130)%3C%2FP%3E%3CP%3EKlarsp%C3%BCler%5BAutoDri%5D*(Temp-130)%3C%2FP%3E%3CP%3EKlarsp%C3%BCler%5BHell%26amp%3BTrocken%5D*(Temp-130)%3C%2FP%3E%3CP%3EKlarsp%C3%BCler%5BKlarheit%5D*(Temp-130)%3C%2FP%3E%3CP%3E...%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIch%20m%C3%B6chte%20nur%20den%20Text%20zwischen%20den%20Symbolen%20%5B%5D%20behalten%3A%3C%2FP%3E%3CP%3EApex.Sp%C3%BClen%3C%2FP%3E%3CP%3EAutoDri%3C%2FP%3E%3CP%3EHell%20und%20trocken%3C%2FP%3E%3CP%3EKlarheit%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EWenn%20ich%20jedoch%20eine%20Formel%20wie%20die%20folgende%20verwende%2C%20erhalte%20ich%20die%20Meldung%2C%20dass%20die%20Formel%20ein%20Zeichen%20erfordert%3C%2FP%3E%3CP%3EBeginnt%20mit(%20%3ATerm%2C%20%22%5B%22%20)%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIrgendwelche%20Ideen%3FDanke%2C%20Paul%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-5020%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EBetreff%3A%20Text%20zwischen%20Trennzeichen%20ausw%C3%A4hlen%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-5020%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EStarts%20with()%20gibt%200%20oder%201%20zur%C3%BCck.%20Wenn%20dies%20Teil%20einer%20Formel%20ist%2C%20die%20ein%20Zeichenargument%20erfordert%2C%20k%C3%B6nnte%20dies%20die%20Fehlermeldung%20erkl%C3%A4ren.%20Starts%20with()%20allein%20w%C3%BCrde%20diesen%20Fehler%20jedoch%20nicht%20ausl%C3%B6sen%2C%20wenn%20%3ATerm%20eine%20Zeichenspalte%20ist.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EIn%20diesem%20Fall%20sollte%20die%20Funktion%20Word()%20funktionieren.%3C%2FP%3E%3CP%3EF%C3%BCgen%20Sie%20dies%20in%20eine%20Spaltenformel%20ein%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%232600eb%3B%22%3EWort%3C%2FSPAN%3E%3CSTRONG%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23009694%3B%22%3E%3CSTRONG%3E%202%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23150097%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23150097%3B%22%3E%20%3A%3C%2FSPAN%3E%20Begriff%3CSPAN%20style%3D%22color%3A%20%23150097%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a70096%3B%22%3E%20%E2%80%9E%5B%5D%E2%80%9C%3C%2FSPAN%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EOder%20wenn%20Sie%20die%20Werte%20in%20der%20Spalte%20%E2%80%9E%3ATerm%E2%80%9C%20ersetzen%20m%C3%B6chten%2C%20versuchen%20Sie%2C%20dieses%20Skript%20auszuf%C3%BChren%20(vorausgesetzt%2C%20vor%20%E2%80%9E%5B%E2%80%9C%20steht%20immer%20Text).%3C%2FP%3E%3CP%20style%3D%22margin%3A%200.0px%200.0px%200.0px%200.0px%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%232600eb%3B%22%3EF%C3%BCr%20jede%20Reihe%3C%2FSPAN%3E%3CSTRONG%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23150097%3B%22%3E%20%3A%3C%2FSPAN%3E%20Begriff%3CSPAN%20style%3D%22color%3A%20%23150097%3B%22%3E%20%3D%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%232600eb%3B%22%3E%20Wort%3C%2FSPAN%3E%3CSTRONG%3E%20(%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23009694%3B%22%3E%3CSTRONG%3E%202%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23150097%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23150097%3B%22%3E%20%3A%3C%2FSPAN%3E%20Begriff%3CSPAN%20style%3D%22color%3A%20%23150097%3B%22%3E%20%2C%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23a70096%3B%22%3E%20%E2%80%9E%5B%5D%E2%80%9C%3C%2FSPAN%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%23150097%3B%22%3E%20%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22margin%3A%200.0px%200.0px%200.0px%200.0px%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%23150097%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3ERegex()%20kann%20ebenfalls%20verwendet%20werden%20und%20erm%C3%B6glicht%20eine%20narrensicherere%20Suche.%20Allerdings%20ist%20hier%20etwas%20zus%C3%A4tzlicher%20Aufwand%20erforderlich%2C%20da%20%5C%5B%20und%20%5C%5D%20in%20jsl%20und%20grep%20eine%20besondere%2C%20aber%20unterschiedliche%20Bedeutung%20haben.%3C%2FP%3E%3CP%3EAber%20das%20sollte%20funktionieren%3A%3C%2FP%3E%3CP%20style%3D%22margin%3A%200.0px%200.0px%200.0px%200.0px%3B%20color%3A%20%23801392%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%232800e1%3B%22%3ERegex%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSTRONG%3E%20(%3ABegriff%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23160091%3B%22%3E%20%2C%3C%2FSPAN%3E%20%E2%80%9E%5C%5B%5C%5B(.%2B%3F)%5C%5D%5C%5D%E2%80%9C%3CSPAN%20style%3D%22color%3A%20%23160091%3B%22%3E%20%2C%3C%2FSPAN%3E%20%E2%80%9E%5C1%E2%80%9C%3CSPAN%20style%3D%22color%3A%20%23000000%3B%22%3E%3CSTRONG%3E%20)%3C%2FSTRONG%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22color%3A%20%23160091%3B%22%3E%20%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EDie%20Nachricht%20wurde%20bearbeitet%20von%3A%20Marcus%20Sundbom%3CBR%20%2F%3E%20Regex()%20hinzugef%C3%BCgt%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
paulp
Level III

select text between delimiters

Hello,  I'm trying to write a formula to select text that lies between the delimiters [ ].

All text in my column appears as below:

RinseAid[Apex.Rinse]*(Temp-130)

RinseAid[AutoDri]*(Temp-130)

RinseAid[Bright&Dry]*(Temp-130)

RinseAid[Clarity]*(Temp-130)

...

I want to keep only the text between the [ ] symbols:

Apex.Rinse

AutoDri

Bright&Dry

Clarity

But using a formula such as below, Iget a mesage that the formula requires a character

Starts With( :Term, "[" ),

Any ideas?  thanks, Paul


1 REPLY 1
ms
Super User (Alumni) ms
Super User (Alumni)

Re: select text between delimiters

Starts with() returns 0 or 1.  If that is part of a formula that require character argument, that could explain the error message. However, Starts with() alone would not give that error if :Term is a character column.

In this case,  the Word() function should work.

Paste this into a column formula

Word( 2, :Term, "[]" )

Or if you want to replace the values in the :Term column, try running this script (assumes there is always some text before "[")

For Each Row( :Term = Word( 2, :Term, "[]" ) );


Regex() can also be used and allows a more fool-proof search. However, here it requires some extra effort since \[ and \] have special but different meaning in jsl and grep.

But this should work:

regex(:Term,"\[\[(.+?)\]\]","\1");

Message was edited by: Marcus Sundbom
Added Regex()

Recommended Articles