Skip to main content
The 2024 Developer Survey results are live! See the results
added 191 characters in body
Source Link
Johann du Toit
  • 2.7k
  • 2
  • 17
  • 31

You could try to Url encode the content between the space (The keys and the values not the : symbol) but this would require that you have control over the Input Method.

Or you could simply use another format (Like XML or JSON), but again you will need control over the Input Format.

If you can't control the input format you could always use a Regular expression and that searches for single spaces where a word plus : follows.

Update (Thanks Jon Grant) It appears that you can have spaces in the key and the value. If this is the case you will need to seriously rethink your strategy as even Regex won't help.

You could try to Url encode the content between the space (The keys and the values not the : symbol) but this would require that you have control over the Input Method.

Or you could simply use another format (Like XML or JSON), but again you will need control over the Input Format.

If you can't control the input format you could always use a Regular expression and that searches for single spaces where a word plus : follows.

You could try to Url encode the content between the space (The keys and the values not the : symbol) but this would require that you have control over the Input Method.

Or you could simply use another format (Like XML or JSON), but again you will need control over the Input Format.

If you can't control the input format you could always use a Regular expression and that searches for single spaces where a word plus : follows.

Update (Thanks Jon Grant) It appears that you can have spaces in the key and the value. If this is the case you will need to seriously rethink your strategy as even Regex won't help.

Source Link
Johann du Toit
  • 2.7k
  • 2
  • 17
  • 31

You could try to Url encode the content between the space (The keys and the values not the : symbol) but this would require that you have control over the Input Method.

Or you could simply use another format (Like XML or JSON), but again you will need control over the Input Format.

If you can't control the input format you could always use a Regular expression and that searches for single spaces where a word plus : follows.