Goonstation Forums
The RegEx Replace and RegEx Find MechComp components do not work - Printable Version

+- Goonstation Forums (https://forum.ss13.co)
+-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6)
+--- Forum: Bug Reports (https://forum.ss13.co/forumdisplay.php?fid=9)
+---- Forum: Resolved (https://forum.ss13.co/forumdisplay.php?fid=16)
+---- Thread: The RegEx Replace and RegEx Find MechComp components do not work (/showthread.php?tid=6458)



The RegEx Replace and RegEx Find MechComp components do not work - Jfighter - 05-28-2016

RegEx Replace Component Bug
Overview: This component acts as a relay(passes on whatever comes in) instead of applying any RegEx.
Reproduction:
  1. Link up Button > RegEx Replace > Sound Synthesizer
  2. Set the signal for the button to "olive garden"(no quotes)
  3. Set the expression for the RegEx to /olive//g
  4. Press the Button
Expected: The sound synthesizer says " garden"
Actual: The sound synthesizer says "olive garden"

RegEx Find Component Bug
Overview: This component stops all signals instead of letting through signals that match the expression. I could not find any expression that lets through a signal.
Reproduction:
  1. Link up Button > RegEx Find > Sound Synthesizer
  2. Set the signal for the button to "olive garden"(no quotes)
  3. Set the expression for the RegEx to /olive/
  4. Press the Button
Expected: The sound synthesizer says "olive garden"
Actual: Nothing happens


RE: The RegEx Replace and RegEx Find MechComp components do not work - Dabir - 05-29-2016

Have you tried alternate methods of input? It could just be that the button's broken. In fact I think it might be that the button is broken.


RE: The RegEx Replace and RegEx Find MechComp components do not work - Jfighter - 05-29-2016

Ya I tried all of the following with the same signal and RegEx setups and they didn't work.
  • Wifi > Signal splitter > RR > Sound
  • Pressure plate > RR > Sound
  • Pressure plate > RF > Sound
  • Microphone > RR > Sound
  • Microphone > RF > Sound



RE: The RegEx Replace and RegEx Find MechComp components do not work - Wire - 05-30-2016

Note: This is probably related to the over-escaping of regex input strings (html and url encoding i think).


RE: The RegEx Replace and RegEx Find MechComp components do not work - somepotato - 05-31-2016

The regex component doesn't accept flags anymore.
Just input the plain regex.


RE: The RegEx Replace and RegEx Find MechComp components do not work - Z3shep - 06-16-2016

The syntax for the RegEx Replace component used to be /find/replace/flags.
Now that RegEx components interpret slashes literally, the syntax to Replace is...
What, exactly?


RE: The RegEx Replace and RegEx Find MechComp components do not work - ihenn - 08-30-2016

Yes, the RegEx replace component no longer has full functionality. It still works, to an extent, by removing whatever string it has matched.

So two things could happen: either re-brand the component as a RegEx Remove Component(and update the default string so as not to confuse people as why it doesn't work); or implement the replace functionality once again. This would be my preferred approach.